Buttons database

This is the old CB2 Forum Button Database from September 2010 compiled and published by morat here.

WARNING!!! Some of these buttons are very old and may not work at all or may even crash your browser. So take the proper precautions.

  1. +friendfeed

    Code Tab

    loadURI("javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('src','http://appsapps.info/ff/friendfeed-drag.js');document.body.appendChild(e)})())");

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/share-content-friendfeed.html');

    Help Tab

  2. about:me

    Code Tab

    /*CÓDIGO*/
    gBrowser.selectedTab = gBrowser.addTab('about:me');
    

    Initialization Tab

    /*Código de inicialização*/
    this.setAttribute("author", 'Pedro Bessa');				// Stores Author.
    this.setAttribute("version", '0.1');                                   	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/aboutme.html');		// Stores Dependency.
    this.setAttribute("status", 'Completed');				// Stores Devstatus.
    this.setAttribute("public", true);

    Help Tab

  3. ABP EHH

    Code Tab

    // Open/Close the Adblock Plus: Element Hiding Helper
    ehhSelectElement();

    Initialization Tab

    // Check for Custom Buttons²
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    // Initialise the tooltip
    this.tooltipText = "Toggle ABP: Element Hiding Helper";
    /*------------------- Attributes Block Start ------------------*/
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1 (2009-04-20)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-adblock-plus-element-hiding-helper.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.9*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Attributes Block End -------------------*/

    Help Tab

    Click the button to open the Adblock Plus: Element Hiding Helper (ABP EHH) or close it if you are already in it.
  4. accuweather

    Code Tab

    /*Code*/
    this.address="12345";
    this.color="1";
    this.beg="http://netwx.accuweather.com/netWx-V24.swf?zipcode=";
    this.mid="&customtheme=&theme=";
    this.end="&metric=0&target=_blank&lang=eng&url=&video=&category=";
    gBrowser.selectedTab = gBrowser.addTab(event.target.beg+address+mid+color+end);
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','beerman');
    this.setAttribute('version','20070120.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/weather-button.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  5. Add a Comment

    Code Tab

    /* 
       Date-Time Stamp:  Wed Jan 17 2007 12:08:03 AM GMT-0800 (Pacific Standard Time)
       cblover http://minidata.googlepages.com/
    */
    (function(){
    var p = prompt("Add a Comment",""); if (p == null || p == "") return;
    content.document.body.innerHTML = "<table width=100%><tr><td align=left>" + p + "\n</td></tr></table>" + content.document.body.innerHTML;
    })();
    

    Initialization Tab

    /*Initialization code*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','cblover, SCClockDr');
    this.setAttribute('version','20090212.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-timestamp-comment-url.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    **********************************************************
       Left Click prompts you for a comment. If you add
     a comment and click OK your comment will be inserted
     into the top of the focused webpage.
  6. Add New Button

    Code Tab

    custombuttons.addButton();

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','20090413.00');
    this.setAttribute('dependency','Fx3.0.*, Fx2.0.*, Fx1.5.*, Fl2.*, Tb2.*, Tb1.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-new-button.html');

    Help Tab

    Left: Opens the "Add New Button" window in Custom Buttons²
  7. Add new test button

    Code Tab

    /*
        This button can be used to quickly create buttons with pre-defined code.
        The various parameters can be customised in the "Initialization code" tab.
        Rawny ^^
    */

    Initialization Tab

    /*----------------------------------------------------
      Function:  this.doDate( )
      Args:	None
      Returns: Version String
      Calls:  
        Date()
        d.getMonth()	0 based
        d.getDate()	        1 based
        d.getFullYear()	1 based
    ----------------------------------------------------*/
    this.doDate = function( ) {
      var d = new Date();
            let _y = String( d.getFullYear() );
            let _m = ( d.getMonth() < 9 )? '0' + String( d.getMonth() + 1 ) : String( d.getMonth() + 1 );
            let _d = ( d.getDate() <= 9 )? '0' + String( d.getDate() ) : String( d.getDate() );
      return  '(' + _y + '-' + _m + '-' + _d +')' ;
    }; // End function this.doDate()
    // Gets the username from the site for using in the new button's attributes.
    var user = "";
    // The image to use in the new button
    var default_img = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnsK8UpK2sy6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AAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // The code for the new button (please note this must be escaped carefully so that it doesn't break out of it's string)
    var code = "/*"+"\n"+
    "\n"+
    "Rawny ^^"+"\n"+
    "\n"+
    "*/";
    // The initialisation code for the new button (please note this must be escaped carefully so that it doesn't break out of it's string)
    var init_code = "var de = createDebug(this);"+"\n"+
    "\n"+
    "this.leftclick = function(evt)"+"\n"+
    "{"+"\n"+
    "  alert('Left click, replace this with whatever you like in the initialization code');"+"\n"+
    "};"+"\n"+
    "\n"+
    "\n"+
    "this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot"+"\n"+
    "this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );"+"\n"+
    "\n"+
    "\n"+
    "// ***** ATTRIBUTES ***** //"+"\n"+
    "\n"+
    "this.tooltipText = 'Tooltip';"+"\n"+
    "\n"+
    "this.setAttribute('author','"+user+"');"+"\n"+
    "this.setAttribute('version','1 "+this.doDate()+"');"+"\n"+
    "this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-new-test-button.html');"+"\n"+
    "this.setAttribute('dependency','FF3.0*, CB2 3.0.*');"+"\n"+
    "this.setAttribute('status','Development');"+"\n"+
    "this.setAttribute('public',false);";
    // On left click create the button with the attributes defined above
    this.leftclick = function(evt)
    {
      createButton("test", default_img, code, init_code);
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    // ***** ATTRIBUTES ***** //
    this.tooltipText = "Add new test button";
    this.setAttribute('author','Rawny, SCClockDr');
    this.setAttribute('version','3 (2009-04-24)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-new-test-button.html');
    this.setAttribute('dependency','FF3.0*, CB2 3.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button can be used to quickly create buttons with pre-defined code.
    The various parameters can be customised in the "Initialization code" tab.
  8. Add SearchWord

    Code Tab

    /*CODE*/
    

    Initialization Tab

    /*Initialization Code*/
    //ローケール対応jaとそれ以外
    var locale = Components.classes["@mozilla.org/preferences-service;1"].
                 getService(Components.interfaces.nsIPrefBranch);
    locale = locale.getCharPref("general.useragent.locale");
    this.label = locale.indexOf("ja") == -1 ? "Add SearchWord" : "検索語句追加";  //ボタンラベル用
    var LABEL1  = locale.indexOf("ja") == -1 ? " Search " : "検索";               //ツールチップ, メニュー用
    var LABEL2  = locale.indexOf("ja") == -1 ? "Search In" : "URL検索追加";       //ツールチップ, メニュー用
    this.tooltipText = "[L=AND"+LABEL1+" | M=OR"+LABEL1+" | R=NOT"+LABEL1+"]"
    //コンテキストメニューの定義
    var menuItems = [];
    menuItems[0] = ["vSButton1", "1", "AND"+LABEL1+": " , "vSButton.addSearchWord(event,1);", "context-viewpartialsource-selection"];
    menuItems[1] = ["vSButton2", "2", "O R "+LABEL1+": ", "vSButton.addSearchWord(event,2);", "context-viewpartialsource-selection"];
    menuItems[2] = ["vSButton3", "3", "NOT"+LABEL1+": " , "vSButton.addSearchWord(event,3);", "context-viewpartialsource-selection"];
    menuItems[3] = ["vSButton4", "4", LABEL2 + ":  "    , "vSButton.addSearchWord(event,4);", "context-viewpartialsource-selection"];
    window.vSButton = {
      menuItems:  menuItems,
      CONTXTMENU: true,  //検索語句追加メニューをコンテキストメニュー表示する
      //エンジン毎に検索語句の追加の仕方を返す
      getFunc: function(event,aParam){
      //エンジン名の一部,{Lクリック, Mクリック, Rクリック, シフト+Lクリック} で, %%Sが選択文字に置き換わったものが検索語句に追加される
        const aFunc ={'Google'       : {AND:' +"%%S"', OR:' OR "%%S"', NOT:' -"%%S"', SL:' site:%%S'},
                      'Yahoo'        : {AND:' +"%%S"', OR:' OR "%%S"', NOT:' -"%%S"', SL:' site:%%S'},
                      'goo '         : {AND:' "%%S" ', OR:' OR "%%S"', NOT:' -"%%S"', SL:''         },
                      'Live Search'  : {AND:' +"%%S"', OR:' OR "%%S"', NOT:' -(%%S)', SL:''         },
                      'Wikipedia-JP' : {AND:' %%S'   , OR:' OR %%S'  , NOT:''       , SL:''         }
                     };
        var func ='';
        try{
          var searchBar = BrowserSearch.getSearchBar();
        }catch(e){
          var searchBar = BrowserSearch.searchBar;  //fx3
        }
        if (!searchBar) return func;  //サーチバーがない
        const nsIBSS = Components.interfaces.nsIBrowserSearchService;
        const searchService =Components.classes["@mozilla.org/browser/search-service;1"].getService(nsIBSS);
        var curEngine = searchService.currentEngine; //カレントエンジン
        for (var prop in aFunc) {
           if (curEngine.name.indexOf(prop) != -1){
            if(aParam){
              if(aParam==1) func = aFunc[prop].AND;
              if(aParam==2) func = aFunc[prop].OR;
              if(aParam==3) func = aFunc[prop].NOT;
              if(event && event.shiftKey || aParam==4) func = aFunc[prop].SL;
            }else{
              if(!event.button) func = '';
              if(event.button==0 && event.shiftKey){ func = aFunc[prop].SL;break;}
              if(event.button==0) func = aFunc[prop].AND;
              if(event.button==1) func = aFunc[prop].OR;
              if(event.button==2){func = aFunc[prop].NOT;event.preventDefault();}
            }
            break;
          }
        }
        return func;
      },
      //検索語句を追加し検索実行
      addSearchWord: function(event,aParam){
        try{
          var searchBar = BrowserSearch.getSearchBar();
        }catch(e){
          var searchBar = BrowserSearch.searchBar;  //fx3
        }
        if (!searchBar) return;  //サーチバーがない
        var func = vSButton.getFunc(event,aParam);
        if(aParam !=4 && !event.shiftKey){
          var selected = this._getselection();
          if(selected =='') return;
        }else{
          if(gContextMenu && gContextMenu.linkURL)
            selected = vSButton.convertURL(gContextMenu.linkURL);
          else
            selected = vSButton.convertURL(window.content.location.href);
        }
        if(func=='') func = ' %%S';//デフォ
        if((event && event.shiftKey || aParam==4) && searchBar.hasAttribute('empty')) {
          searchBar.value = func.replace(/%%S/, selected);return;
        }
        else if(searchBar.hasAttribute('empty')) searchBar.value = selected;
        else searchBar.value = searchBar.value + func.replace(/%%S/, selected);
        //検索実行
        BrowserSearch.loadSearch(searchBar.value,false);
        //フェイクイベント
        var evt = document.createEvent("UIEvents");
        evt.initUIEvent("input", true, false, window, 0);
        searchBar.dispatchEvent(evt);
      },
      //現在のウインドウを得る
      _getFocusedWindow: function(){
        var focusedWindow = document.commandDispatcher.focusedWindow;
        if (!focusedWindow || focusedWindow == window)
          return window._content;
        else
          return focusedWindow;
      },
      //選択されている文字列を得る
      _getselection: function() {
        var targetWindow = this._getFocusedWindow();
        var sel = Components.lookupMethod(targetWindow, 'getSelection').call(targetWindow);
        // for textfields
        if (sel && !sel.toString()) {
          var node = document.commandDispatcher.focusedElement;
          if (node &&
              (node.type == "text" || node.type == "textarea") &&
              'selectionStart' in node &&
              node.selectionStart != node.selectionEnd) {
              var offsetStart = Math.min(node.selectionStart, node.selectionEnd);
              var offsetEnd   = Math.max(node.selectionStart, node.selectionEnd);
              return node.value.substr(offsetStart, offsetEnd-offsetStart);
          }
        }
        return sel ? sel.toString().replace(/\s/g,' ').replace(/^[\ ]+|[\ ]+$/g,'').replace(/[\ ]+/g,' ') : "";
      },
      //コンテキストメニューの表示調整
      onpopup: function(aEvent){
        var func;
        var selected = vSButton._getselection();
        if (selected.length > 15) selected = selected.substr(0,15) + "...";
        var menuItems = vSButton.menuItems;
        //AND,OR,NOT検索メニュー
        for (var i=0 ; i<3;i++) {
          func = vSButton.getFunc(null, i+1);
          var mitem = document.getElementById(menuItems[i] [0]);
          if(func !='' && vSButton.CONTXTMENU && selected !='' ){
            mitem.label = mitem.label.substr(0,mitem.label.indexOf(':')+2) + "\"" + selected + "\"";
            mitem.setAttribute('hidden', 'false');
          }else{
            mitem.setAttribute('hidden', 'true');
          }
        }
        //URL検索メニュー
        func = vSButton.getFunc(null, 4);
        var mitem = document.getElementById(menuItems[3] [0]);
        if(gContextMenu && gContextMenu.linkURL){
          var url = gContextMenu.linkURL;
        }else{
          var url = gBrowser.currentURI.spec;
        }
        var host = vSButton.convertURL(url);
        if(func !='' && host !='' ){
          try{
            mitem.label = mitem.label.substr(0,mitem.label.indexOf(':')+3) + host;
          }catch(e){}
          mitem.setAttribute('hidden', 'false');
        }else{
          mitem.setAttribute('hidden', 'true');
        }
      },
      //URLからホスト部を返す
      convertURL: function(url){
        if(!url.match(/^https?/i))return '';
        var urlParts = url.match(/^(.+?:\/\/)([^\/]+@)?([^\/]*)(.*)$/);
        var scheme   = urlParts[1] ? urlParts[1] : '';
        var userpass = urlParts[2] ? urlParts[2] : '';
        var domain   = urlParts[3] ? urlParts[3] : '';
        var request  = urlParts[4] ? urlParts[4] : '';
        return domain;
      },
      //デバッグ
      debug: function(aMsg){
        const Cc = Components.classes;
        const Ci = Components.interfaces;
        Cc["@mozilla.org/consoleservice;1"]
          .getService(Ci.nsIConsoleService)
          .logStringMessage(aMsg);
      }
    };
    //コンテキストメニューの定義
    var menuItems = [];
    menuItems[0] = ["vSButton1", "1", "AND"+LABEL1+": " , "vSButton.addSearchWord(event,1);", "context-viewpartialsource-selection"];
    menuItems[1] = ["vSButton2", "2", "O R "+LABEL1+": ", "vSButton.addSearchWord(event,2);", "context-viewpartialsource-selection"];
    menuItems[2] = ["vSButton3", "3", "NOT"+LABEL1+": " , "vSButton.addSearchWord(event,3);", "context-viewpartialsource-selection"];
    menuItems[3] = ["vSButton4", "4", LABEL2 + ":  "    , "vSButton.addSearchWord(event,4);", "context-viewpartialsource-selection"];
    vSButton.menuItems = menuItems;
    for (var i=0 ; i<4;i++) {
      var elem = document.getElementById(menuItems[i] [0]);
      if(elem) elem.parentNode.removeChild(elem);
    }
    for (var i=0 ; i<4;i++) {
      var menuitem = document.createElement('menuitem');
      menuitem.id  = menuItems[i] [0];
      menuitem.setAttribute('accesskey',menuItems[i] [1]);
      menuitem.setAttribute('label',menuItems[i] [2]);
      menuitem.setAttribute('oncommand',menuItems[i] [3]);
      document.getElementById("contentAreaContextMenu").insertBefore(menuitem,  document.getElementById(menuItems[i] [4]));
    }
    document.getElementById('contentAreaContextMenu').removeEventListener('popupshowing', vSButton.onpopup, false);
    document.getElementById('contentAreaContextMenu').addEventListener('popupshowing', vSButton.onpopup, false);
    //ショートカットキーの定義
    vSButton.keysets = {
                 key_vSButton1:["1","vSButton.addSearchWord(null,1);","alt"],
                 key_vSButton2:["2","vSButton.addSearchWord(null,2);","alt"],
                 key_vSButton3:["3","vSButton.addSearchWord(null,3);","alt"],
                 key_vSButton4:["4","vSButton.addSearchWord(null,4);","alt"]
    };
    var keysets = vSButton.keysets;
    for (var id in keysets) {
      var accel = document.createElement('key');
      accel.id  = id;
      switch(typeof keysets[id] [0]){
        case 'number': accel.setAttribute('keycode',keysets[id] [0]); break;
        case 'string': accel.setAttribute('key',keysets[id] [0]); break;
      }
      accel.setAttribute('oncommand',keysets[id] [1]);
      accel.setAttribute('modifiers',keysets[id] [2]);
      document.getElementById('mainKeyset').appendChild(accel);
    }
    // ---------------   Event Detect   ------------------
    this.handle = function(evt) {
      try {
      if(evt.ctrlKey) {
        this.showPopup(this);
        return;
      }
          vSButton.addSearchWord(evt,null);
      }catch(e) {alert(e);}
      evt.preventDefault();
      evt.stopPropagation();
      return false;
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.handle(event);");
    this.style.opacity = '.65';
    this.setAttribute('style','border-color: transparent;');
    this.setAttribute("onmouseover", "this.style.opacity = '1'; this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';this.setAttribute('style','border-color: transparent;');" );
    this.setAttribute("onmousedown", "this.setAttribute('style','border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;');");
    this.setAttribute("onmouseup", "this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');");
    this.setAttribute('author','Alice0775');
    this.setAttribute('version','20090413.00');
    this.setAttribute('dependency','Fx3.0.*, Fx2.0.*, Fx1.5.*, Fl2.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-searchword-button.html');

    Help Tab

    Select text and click the button, or one of the context menu items, to add the selected string to your current search query string. Then a new set of results based on your updated search query string will be returned. Different clicks/context menu items affect the operator inserted into the query between the existing string and your new piece of text.
    Button mouse click behaviour:
        * Left: AND search
        * Middle: OR Search
        * Right: NOT Search
        * Shift+Any Click: In The Site Search
        * Ctrl+Any Click: Custom Buttons² Context Menu Popup
    The following are also added to Content Area Context Menus by the button:
        * AND Search: "selected word"
        * OR Search: "selected word"
        * NOT Search: "selected word"
        * Search In: "selected word" or "link host name"
    Supported search engines are as follows.
        * Google
        * Yahoo
        * Goo
        * Live Search
  9. Add TimeStamp Comment URL

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.ts( 0 );
    };
    this.sleftclick = function(evt)
    {
      this.ts( 1 );
    };
    this.midclick = function(evt)
    {
      let p = prompt("Add a Comment",""); if (p == null || p == "") return;
      content.document.body.innerHTML = "<table width=100%><tr><td align=left>" + p + "\n</td></tr></table>" + content.document.body.innerHTML;
    };
    this.rightclick = function(evt)
    {
      let sURL = gURLBar.value;
      content.document.body.innerHTML = "<table width=100%><tr><td align=left><small>" + sURL + "</small>\n</td></tr></table>" + content.document.body.innerHTML;
    };
    this.ts = function( tmode ){
      /* Constants    */ var c=":", b=" ", hs = String.fromCharCode(160);
      /* Date         */ var t=new Date();
      /* Year         */ var y=1900+t.getYear();
      /* Minutes      */ var min=t.getMinutes(); if (min<10){min="0"+min};
      /* Seconds      */ var s=t.getSeconds(); if (s<10){s="0"+s};
      let h = 0, ap = "";
      if ( tmode === 0 ) {
        /* Time 12 Hour */
        h = t.getHours();
        ap="AM";
        if (h>=12) ap="PM";
        if (h>12) h=h-12;
        if (h==0) h=12;
        h = h + c + min + c + s + b + ap;
      }
      else{
        /* Time 24 Hour */
        h = t.getHours();
        if (h<=9) h = "0" + h;
        h = h + c + min + c + s + hs + hs + hs + hs;
      }
      /* Day of Week  */ var dw=t.getDay();switch(dw){case 0: dw="Sun";break;case 1: dw="Mon";break;case 2: dw="Tue";break;case 3: dw="Wed";break;case 4: dw="Thu";break;case 5: dw="Fri";break;default: dw="Sat";}
      /* Month        */ var m=t.getMonth();switch(m){case 0: m="Jan";break;case 1: m="Feb";break;case 2: m="Mar";break;case 3: m="Apr";break;case 4: m="May";break;case 5: m="Jun";break;case 6: m="Jul";break;case 7: m="Aug";break;case 8: m="Sep";break;case 9: m="Oct";break;case 10: m="Nov";break;default: m="Dec";}
      /* Day of Month */ var d=t.getDate();
      /* Time Zone    */ var tz=String(t).substring(25);
      /* Output       */ var p=dw+b+m+b+d+b+y+b+h+b+tz;
      content.document.body.innerHTML = "<table width=100%><tr><td align=right>" + p + "</td></tr></table>" + content.document.body.innerHTML;
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','cblover, SCClockDr');
    this.setAttribute('version','20090212.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-timestamp-comment-url.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText += "\nL\t12 Hr\nL+S\t24 Hr\nM\tComment\nR\tAdd URL";
    

    Help Tab

    ********************************************************************
        cblover http://minidata.googlepages.com/
       Date-Time Stamp:  Fri Jan 19 2007 11:21:09 PM GMT-0800 (Pacific Standard Time)
                         Fri Jan 19 2007 23:21:09    GMT-0800 (Pacific Standard Time)
       Comment:          Any desired comment
       Add URL:          http://minidata.googlepages.com/
         cblover http://minidata.googlepages.com/
         SCClockDr
           Joined: 25 Dec 2006  
           Location: SC UpState
         is the primary author of this 12|24 version of the Date-Time Stamp code.
       Left Click ---------> 12 hour TimeStamp
       Shift+Left Click ---> 24 hour TimeStamp
       Middle Click -------> Add a Comment
       Shift-Right Click --> custom button menu
       Right Click --------> Add URL
    
  10. Add to Kaboodle

    Code Tab

    /*Code*/
    function anonymous() {
        var _mg56v = "0.3";
        (function () {var d = content.document;var s;try {s = d.standardCreateElement("script");} catch (e) {}if (typeof s != "object") {s = d.createElement("script");}try {s.type = "text/javascript";s.src = "http://www.kaboodle.com/zg/g.js";s.id = "c_grab_js";d.getElementsByTagName("head")[0].appendChild(s);} catch (e) {window.location = "http://www.kaboodle.com/za/selectpage?p_pop=false&pa=url&u=" + window.location;}}());
    }
    anonymous();
    

    Initialization Tab

    /*Initialization Code*/ 
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-kaboodle.html');

    Help Tab

  11. Add to Wish List

    Code Tab

    this.run();

    Initialization Tab

    var u='http://www.amazon.com/wishlist/add';
    this.run=function() {
      var doc=content.document;
      var s=doc.createElement('script');
      if(typeof s != 'object')
        doc.location.href=u+'?u='+encodeURIComponent(doc.location)+'&t='+encodeURIComponent(doc.title);
      this.tryLoadAndShow();
    }
    this.tryClick=function() {
      var doc=content.document;
      var b=doc.getElementById('wishListButton');
      b.click();
    }
    this.tryLoadAndShow=function() {
      var doc=content.document;
      var win=content.window;
      var head=doc.getElementsByTagName('head')[0];
      var button=this;
      if(doc.readyState && doc.readyState != 'complete') {
        setTimeout(this.tryLoadAndShow, 200);
      } else {try {
        var req = new XMLHttpRequest();
        req.onreadystatechange=function() {
          if (req.readyState==4) {
            if (req.status==200)
            {
              try {
                var resp=req.responseText;
                s=doc.createElement('script');
                s.type='text/javascript';
                s.innerHTML=resp;
                head.appendChild(s);
                b=doc.getElementById('wishListButton');
                if (!b) {
                  b=doc.createElement('input');
                  b.setAttribute('type', 'button');
                  b.setAttribute('style','visibility: hidden;');
                  b.setAttribute('value','Add to Wishlist');
                  b.setAttribute('name','Add to Wishlist');
                  b.id='wishListButton';
                  b.setAttribute('onclick','AUWLBook.showPopover();');
                  doc.body.appendChild(b);
                }
                setTimeout(button.tryClick, 0);
              } catch (ex) {
                alert(ex);
              }
            } else {
              alert(req.status);
            }
          }
        }
        req.open('GET', u+'.js?loc='+encodeURIComponent(doc.location));
        req.send(null);
      } catch (ex) {
        alert(ex);
      }}
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.style.opacity = '.99';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    this.setAttribute("author", "LostLogic" );
    this.setAttribute("status","Development");
    this.setAttribute("public", true);
    this.setAttribute("dependency","FF 3.*,CB 2.0.9.10");
    this.setAttribute("version","2009031300");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/amazon-wish-list.html');
    this.setAttribute("update","");
    this.setAttribute("help","0,Click the button, enter the info, get any item on any site added to your amazon wish list.");

    Help Tab

    Click the button, enter the info, get any item on any site added to your amazon wish list.
  12. Add URL

    Code Tab

    /*CODE*/
    /* 
       Credits:
    	Code: 
    		cblover & SCClockDr
    	Art:
    		SCClockDr
    */
    (function(){
    var sURL = gURLBar.value;
    content.document.body.innerHTML = "<table width=100%><tr><td align=left><small>" + sURL + "</small>\n</td></tr></table>" + content.document.body.innerHTML;
    })();
    

    Initialization Tab

    /*Initialization Code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute("author", "SCClockDr, cblover" );
    this.setAttribute("dependency","FF 2.*, CB2 2.0.*");
    this.setAttribute("version","20080124.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-url-button.html');
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.setAttribute("update","");
    this.setAttribute("help","0,Help has not been defined for this button.");
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    Help not developed for
    <label> button
    Cbuttons2-button<id>.
    
  13. Add-ons Manager

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      BrowserOpenAddonsMgr();
    };
    this.midclick = function(evt)
    {
      gBrowser.addTab("chrome://mozapps/content/extensions/extensions.xul?type=extensions");
    };
    this.rightclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20080410.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-ons-manager.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText += '\n L: Open in Window  M: Open in Tab  R: Context Menu ';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    /*Help*/
    Left-click opens the Add-ons Manager.
  14. Add-ons Manager (sidebar version)

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
    	if ( typeof aios_getObjects == "function" ) {
    		toggleSidebar("viewAddonsSidebar");
    	} else {
    		let title = "Extensions in Sidebar"
    		let link = "chrome://mozapps/content/extensions/extensions.xul";
    		if (/Extensions \[/.test( document.getElementById('sidebar-title').getAttribute('value') ) ) {
    			toggleSidebar();
    		} else {
    			if (/extensions\.xul$/.test( link )) {
    				toggleSidebar('viewWebPanelsSidebar', true);
    				document.getElementById('sidebar').setAttribute('src', link );
    				document.getElementById('sidebar-title').setAttribute('value', title );
    			} else {
    				openWebPanel( title, link );
    			}
    		}
    	}
    };
    this.midclick = function(evt)
    {
      gBrowser.addTab("chrome://mozapps/content/extensions/extensions.xul?type=extensions");
    };
    this.rightclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25, rawny, others');
    this.setAttribute('version','20090314.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-ons-manager.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText += '\n L: Open in Sidebar  M: Open in Tab  R: Context Menu ';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    /*Help*/
    Left-click opens the Add-ons Manager in the sidebar.
  15. Address Bar Companion

    Code Tab

    /*
    	Based on LouCypher's (aka Zoolcar9)
    	Paste and Go button
    	Original code is Paste and Go Button extension for Firefox
         	http://loucypher.wordpress.com/projects/extensions/#paste-and-go-button
         	This button authored by m435tr0d
         	L = Pastes URL from the clipboard and directly loads it
         	M = Duplicates current tab
         		IF you type something in the addressbar 
         		then middle click performs the normal "Go" action
         	R = Clear addressbar
    	Shift+R = Custom Buttons Menu
         	Drag and Drop a link onto the button to open it
         	On mouseover the Tooltip shows contents of your clipboard
    */

    Initialization Tab

    if(typeof duplicateTab.duplicateTab != "function") {
      var ext = "Duplicate Tab";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.abc = function(aEvent) {
      var adBar = gURLBar.value;
      var tabLo = content.document.location.href;
      var str = readFromClipboard();
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      if (pasteURL)	{
        gBrowser.addTab(str);
      }
      else { 
        var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
        try {
          var adrbrURL = ioService.newURI(adBar, null, null);
        } catch(ex) {
        }
        if (!(adBar == tabLo) && (adrbrURL)) {
          gBrowser.addTab(adBar);
        }
        else if (adBar.match(".co") || adBar.match(".net") || adBar.match(".org") || adBar.match(".us") || adBar.match(".biz") || adBar.match(".info") || adBar.match(".ws") || adBar.match(".edu") || adBar.match(".mil") || adBar.match(".tv") || adBar.match(".cc") || adBar.match(".ca")) {
          this.goDup();
        }
        else {
          this.goDup();
        }
      }
    }
    this.goDup = function() {
      if((content.document.location.href == gURLBar.value) || (gURLBar.value == "")) {
        //USE TWANNO'S DUPLICATE TAB EXTENSION TO DUPLICATE TAB
        duplicateTab.duplicateTab('tab', getBrowser().mCurrentTab, this);
      }
      else {
        //USE THE REGULAR 'GO' COMMAND
        handleURLBarCommand(this);
      }
    }
    this.clearURLBar = function() {
      gURLBar.value = "";
      gURLBar.focus();
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.toolTip = function(aNode) {
      var str = readFromClipboard();
      var adBar = gURLBar.value;
      var tabLo = content.document.location.href;
    this.aimg=new Array;
      var goImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGz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tASNlsDWmJ2ZkJYZl5YZl2YqJh9+6MGzBR4EA+u73j/whm/p0iUApMwUwTdb+bbnbO4gtmNj2RYAxz45LF7f97xbSmdxvjcK/sUl3gIPdF0vr6mpzt28/+AuLjDEhBPlgzOHp7RUNXRNZyKZ4Nbn7qKqsoJFWmEV8Hi8ngIPpJQMD48A8OmPnxGrjGL12tSW1NBY2ph7Nv0mosph0/FtbN+5vTBrhCgvIOg/N9j2+BO7XwX4edkvzupHbiwzJy3qLtbT9+t5jhw6ngtobl6Dbdlc86ifzu4TdLafZP/W17i56SZ8Xg8r62or8hLi38Wu8ZX6kevurFmmuCWXhxKoIx4qXVWsqr6FtJXGMCf5+q/TVO/0A5AMpzG+0Hlr87usqrueRCJBV9eXjI2NsPvZvaKAoGFv/XDD2trlilsi3BLhkqA7GJMGmlegehU0l4rqUmZlIkROp7mn9D7ag08C0NFxiKfa2kVB3ocvRAatpESaYgoZgbAVfKVePH43Lp+et/nUdwHlARen0id4+/OOK1fT6LHxtT0nh8Jm3JohycLJEjJHC4kPGtSO3kDkp9Heox99TCQSmduD6bHx5aCM+8fwNSzCU6YjXFOSKVnZhGtm7eU+gxX9TXz42NGCEiKu1tGeOdImB8LnMDBIixQezU1cxLi2tQR0GO8xaPq7mfd2HZyzPon5tMyNB9ZJXyjD+O9JbkuuY9+O/eJ/7WgKKpHvU9xth664+bwJopdihPw72BN6QRTd0f4LvunulMWuFQv92/LPANUKAl/q7hr7AAAAAElFTkSuQmCC";
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      if (pasteURL) { this.tooltipText = 'Click to paste & go \''+str+'\''; }
      else { 
        var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
        try {
          var adrbrURL = ioService.newURI(adBar, null, null);
        } catch(ex) {
        }
        if ((!(adBar == tabLo) && ((adrbrURL) || (adBar.match(".co") || adBar.match(".net") || adBar.match(".org") || adBar.match(".us") || adBar.match(".biz") || adBar.match(".info") || adBar.match(".ws") || adBar.match(".edu") || adBar.match(".mil") || adBar.match(".tv") || adBar.match(".cc") || adBar.match(".ca"))))) { this.tooltipText = 'Click to go to \''+adBar+'\''; this.image = goImg;}
        else { 
          if((content.document.location.href == gURLBar.value) || (gURLBar.value == "")) {
            this.tooltipText = 'Click to Duplicate Current Tab'; this.image = dupImg;}
          else {
            this.tooltipText = 'Click to Search for \''+adBar+'\''; this.image = srcImg;}
        }        
      }
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/address-bar-companion.html');
    this.setAttribute("context", "");
    this.setAttribute("onclick", "if(event.shiftKey) this.showPopup(this); if(event.button == 0 && !event.shiftKey) this.abc(event); if(event.button == 1 && !event.shiftKey) this.goDup(); if(event.button == 2 && !event.shiftKey) this.clearURLBar(this);");
    this.setAttribute("onmouseover", "this.toolTip(); this.style.opacity = '.99';");
    this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, goButtonObserver);")
    this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, goButtonObserver);")
    this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, goButtonObserver);")
    this.style.opacity = '.65';
    this.setAttribute("onmouseout", "this.image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAGa0lEQVR42myVS2ycZxWGn+/7b/PPjOdij2+xHdvJxCkpIW3cSBULWiohsahoWCBW3bCLBAtYsWBPJBBCYgdEQmyqikslEmFVpUKiTRuaOonbpLk5TuyMb+PxXP65/PfvY9GAkpAjne15znvec3SE1pqPfjeOTmPibot6coxN8a2iFx94PZblH0rDfBk0IECrlkrCt3JG/bdjxtWVCfU+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kxlk+zMMxSk6FShtInruORzDpFM8ZOIONIkSUIURwAcmphnfmyOhc0FcnGBv3brPAw3sU0YymeLpbg0Yj7ZvQCtEFphSActBaGOGMQhgzQkCiU61U/ZJhBCIoVAa0hS0AqEaVpZM+uYT8xHCEh8RNTGkYI4CWj1BgxCn0ESEAQWEoOM6QBQ26txbesaF2sf8kn9Mo2hXZyswG9oVEpkZa3EfOyMQcdgDGPmjzJSyWHXtug1oef5REaISg2iOKLT81irr7F06+9cWD3Plc4yLauFHFe4jkPaT+KcXWgW8oUv70Br0DqGZBfkItaRnzE1GDC9Lshs3qS775OMxFi2pL3f4cLlJXyry6fRx2yodaLRgHzZwXd9gkaiKt2xYG5ybm92dHbHBHAyLqbu0/38F6jKcWJyiHTAnFYsuN9k784l/Jkesthmo3iD+4ObeHg0SntEboSwBbGVoDYEExtT8WL5pXtfHXt+uWJVPjcBsrnclTCKK+/+7c+6131bODbasUh7E2+OHC29UTT2YrZQdESNunGfsByBaWBaBhKbJFCkbcH4xhwnOqf8l75yfDmXZi/t3Nu5awIMuXzP6+P85jylz+7hVoooy6J/6lXnRy++MvLm8clXyA0cVq5/QOCs03N9hJWSAGkIuUGB2XCWF7KvcazyQliIwxt37tx6UNvcDk2AX77dX/P6mjtbikjB1qPPalxZ+YPtDnenpityfnR2cmTYnd0Wm+XE9suWJTNKK0KZBo7Mt2YKM818MNZorj1cuXbvxrW7d77o7LdaidBaI4T47y7JRykAXSgUZLVazT238NzIya+fPDF5ZHKxHbVnpJTTGTNTAAiSwFNKPSw5pVrtVm354vsXby1fWQ62traaWuvefwYAf7JNE6Dv/qkAAAAASUVORK5CYII='; this.style.opacity = '.65';" );
    this.setAttribute("author",'m435tr0d');								// Stores Author.
    this.setAttribute("version",'20070815.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/address-bar-companion.html');	// Stores HomePage.
    this.setAttribute("dependency",'userChrome,FF 2.0,CB 2.0');					// Stores Dependency.
    this.setAttribute("status",'Prototype');							// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    }

    Help Tab

  16. Address Bar Companion²

    Code Tab

    /*
    	Based on LouCypher's (aka Zoolcar9)
    	Paste and Go button
    	Original code is Paste and Go Button extension for Firefox
         	http://loucypher.wordpress.com/projects/extensions/#paste-and-go-button
         	This button authored by m435tr0d
         	L = Pastes URL from the clipboard and directly loads it
         	M = Duplicates current tab
         		IF you type something in the addressbar 
         		then middle click performs the normal "Go" action
         	R = Clear addressbar
    	Shift+R = Custom Buttons Menu
         	Drag and Drop a link onto the button to open it
         	On mouseover the Tooltip shows contents of your clipboard
            (Rawny's small icon version ^^ )
    */

    Initialization Tab

    this.abc = function(aEvent) {
      var adBar = gURLBar.value;
      var tabLo = content.document.location.href;
      var str = readFromClipboard();
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      if (pasteURL)	{
        gBrowser.addTab(str);
      }
      else { 
        var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
        try {
          var adrbrURL = ioService.newURI(adBar, null, null);
        } catch(ex) {
        }
        if (!(adBar == tabLo) && (adrbrURL)) {
          gBrowser.addTab(adBar);
        }
        else if (adBar.match(".co") || adBar.match(".net") || adBar.match(".org") || adBar.match(".us") || adBar.match(".biz") || adBar.match(".info") || adBar.match(".ws") || adBar.match(".edu") || adBar.match(".mil") || adBar.match(".tv") || adBar.match(".cc") || adBar.match(".ca")) {
          this.goDup();
        }
        else {
          this.goDup();
        }
      }
    }
    this.goDup = function() {
      if((content.document.location.href == gURLBar.value) || (gURLBar.value == "")) {
        gBrowser.duplicateTab(gBrowser.selectedTab);
      }
      else {
        //USE THE REGULAR 'GO' COMMAND
        handleURLBarCommand(this);
      }
    }
    this.clearURLBar = function() {
      gURLBar.value = "";
      gURLBar.focus();
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.toolTip = function(aNode) {
      var str = readFromClipboard();
      var adBar = gURLBar.value;
      var tabLo = content.document.location.href;
    this.aimg=new Array;
      var goImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAAHMAAHkAAH0AAH8AJ38nAIAAAIIAAIUAAIYAAIgAAIsAA40DCIkICYgJEIQQHIAcFZQVIIggJZUlI5gjIpwiKpUqMYYxM58zPao9PK48Pa89P7E/QaBBR65HS6tLSK1ISaxJSK5IS65LRrJGTLVMT7lPUqJSX6BfU7RTVrFWUr1SVb1VX7xfaalpaK1oY7ZjY7tjYLxgZrhmarRqaL1oa71rar9qe7t7V8BXZ8JncMNwf8d/fsh+fsp+icWJi8eLicyJlMKUn8afm8qbnNmcntierditsN+wyOfIz+TPzufOzerN2+3b3+zf2/Db5vHm5vbm6vPq7/fv9vv29/r3+/37/f79AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAc/xscwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACTSURBVChTY/iPBhhwC2gHguUQKix1XFEF1NzsVP0hKkI8rFRkpHVtbW3kHMOAAj5SRtbmhprKCspaxvIGDP89JU2VRHm4ubg4OTn47IEqzBQFRRzcvYPZ2dhkfUFmSPAKh4KMZ+Z3gdgixmICdoB6ANQdFkxCQUjOZfgfrs8o4ATWBHepl544q4azH0IAxX8YvgUAxlGxd/x8gFQAAAAASUVORK5CYII=';
      var srcImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAamp7bWt8d2tzcG19emxzfW1yfm5yfW54UW2HVnKNbYeff4Wvk25jsG5UtH5Tx3lI34U8/69MhJC3i5u/kZi7kpm8lJm8jqC0kqS2mKDBmqTEmaXFmqfHnqvJlLTdmL/amLritrnRt73UmcHcnMXfmcLtm8bwqsPcrMXdrcXeu8LYvcbapdrvodT/pNb/ptvwptzwodj+p9n/qdTxqtbzqdv/q93/sM/gt87jstHiv9Llrev7suT/u+3/v/D//9mo0NLi1NnnwOnywerzzefwwPL9wvT/zv3/0ev11PP+1/b+0///4OHr4OLs4ubv4f//6ff/6/////Pk9f3//v//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABukptgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAC7SURBVChTTc9nG4FQFMDx7J2RvWWLi5BVyUpGQ/H9P8rluh457/6/57w4h4B4VDoTztAqhATubao64AfV1PYLWvr8uLAAtNIa3qg3rncw5OZcpY4hP7qAiSBuxGkeA8WzQ+Gk3BSZwlAYA05UDNPYFzAwTTDf3MynuWAwZIPtz8axqCOwJF8oUJvJh1Vph+6wpETMm+uXk+W+ji59dzzi+X7wBtSkY20Dalf315BwR0lHx25ILP3O3l/DFzmqiN+KBscPAAAAAElFTkSuQmCC';
      var dupImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG6SURBVDjLxVNNKERRFP7ue0/JiIxXyE8aq/HTSP4iG2JpYSEL0qzYWFgrG8zCVopSs5CVnZVIWbFAYuG3NGaKmCz8z9z37rvuvTN+htSUhVPfPefczvd1zrldwjnHX0zDH+3/BQx5BIPBDuGmBJrS5F0IjPr9/hUjeTHj83m9BQWmSghRZzL+9ImYIBq98+zsHMyK5EPAdLtzEQ7fwLJYYjZN+yBJvOeGYaC4OF9xvu2AQNd1VSiLZCz9O5YvxrBwNCxiWaP/XKIk6rqRQv4qEmcUJaYXge0+0YmWusTEjFJAA+eGanXxdBTgNqgjYDMU5VXAW9iEx9gzBpYa0JszkRAQL8DLy0uRleWCy+VSo0gB+5iis2oQjDtgDoMDjqv7CGpKWvFEXzEfGclEEFx1EApFFL5ajFBFvrw7hyW6sB0LFrPwEH9EbWkbnqwXTIeGQH77C/0LlbzbNySITEGKXd+H4c4uxH5kC+snqyfURt2vAj1zHhajVOyAImZTVJhVWrOnC7vhLWycrR0KcuNVgMdJur+xelKL1pe1m5tnG3vUQYsgU7X8dAU84yTKHN18dVjGbUA8T9LeAB6et/fbYA/BAAAAAElFTkSuQmCC";
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      if (pasteURL) { this.tooltipText = 'Click to paste & go \''+str+'\''; }
      else { 
        var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
        try {
          var adrbrURL = ioService.newURI(adBar, null, null);
        } catch(ex) {
        }
        if ((!(adBar == tabLo) && ((adrbrURL) || (adBar.match(".co") || adBar.match(".net") || adBar.match(".org") || adBar.match(".us") || adBar.match(".biz") || adBar.match(".info") || adBar.match(".ws") || adBar.match(".edu") || adBar.match(".mil") || adBar.match(".tv") || adBar.match(".cc") || adBar.match(".ca"))))) { this.tooltipText = 'Click to go to \''+adBar+'\''; this.image = goImg;}
        else { 
          if((content.document.location.href == gURLBar.value) || (gURLBar.value == "")) {
            this.tooltipText = 'Click to Duplicate Current Tab'; this.image = dupImg;}
          else {
            this.tooltipText = 'Click to Search for \''+adBar+'\''; this.image = srcImg;}
        }        
      }
    }
    //this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/address-bar-companion2.html');
    this.setAttribute("context", "");
    this.setAttribute("onclick", "if(event.shiftKey) this.showPopup(this); if(event.button == 0 && !event.shiftKey) this.abc(event); if(event.button == 1 && !event.shiftKey) this.goDup(); if(event.button == 2 && !event.shiftKey) this.clearURLBar(this);");
    this.setAttribute("onmouseover", "this.toolTip(); this.style.opacity = '.99';");
    this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, goButtonObserver);")
    this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, goButtonObserver);")
    this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, goButtonObserver);")
    this.style.opacity = '.65';
    this.setAttribute("onmouseout", "this.image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAABh0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjM1MO6znwAAAdJJREFUOE99k8tLAlEUxidoExkRFP0TPRyiaNGyZWRID9tVuwhToVYt2hZoZioZFBYEBqHTEKlB24gITSGwAgmCwEjIx6YXnPyOjI5aCh9e7z3f7zy8t0FQfY6Ojuk13Sh0tv/wrrI2GCYa1HEV61A4TEl5k3Y822Ra36KXVIY+vr9YWDtcEp8d+px0F5SpBpR06igTGyOv1ULSeYRNasmXcT5DDGL/BCCb73iJs6mFzBAAn1kLvZ9o/wcg4EkylQQgZgIFbk7p+VbmVmsq8G/0cb9feV2FAIwn0nyG74f7RH0AelQrFzezCcMbtI9Qp6uHNe0YoLNgqFzJvrFYQTUAvxcdJpo66SdnVE/urI68uQWaTelIG+ilFb+lCFEA+ZiWh6TI6x5nM0zzpyYWjEOPwwxp82jIKtmoBFCbX+xdNGPvKGWEGVVuXtm4DYDmoiKJy2IZkN5qJbUQiOzIqACUy2WQRkkb7WZYqYJqgFIBMlUDuJ0CQLPWRMLBZAuXVw3AtHlghcC/WsA+YoRdvUhvxuYa4SJhUGgBJXPZhd5hhHCGv1jATdsz62l32VwhHCIzAhUTYIoZZ4W3s1rvlXrxuHZCTi4VA0PPuFTYi1xcs/kXlW5ORQO6hRwAAAAASUVORK5CYII='; this.style.opacity = '.65';" );
    this.setAttribute("author",'m435tr0d, rawny');						                                        // Stores Author.
    this.setAttribute("version",'2009-02-20.00');                                                 	                                // Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/address-bar-companion2.html');	        // Stores HomePage.
    this.setAttribute("dependency",'userChrome,FF 3.0.*,CB 2.0.*');					                                // Stores Dependency.
    this.setAttribute("status",'Complete');							                                        // Stores Devstatus.
    this.setAttribute("public",true);								                                // Stores Public.

    Help Tab

  17. Address Bar Companion²

    Code Tab

    /*
    	Based on LouCypher's (aka Zoolcar9)
    	Paste and Go button
    	Original code is Paste and Go Button extension for Firefox
         	http://loucypher.wordpress.com/projects/extensions/#paste-and-go-button
         	This button authored by m435tr0d
         	L = Pastes URL from the clipboard and directly loads it
         	M = Duplicates current tab
         		IF you type something in the addressbar 
         		then middle click performs the normal "Go" action
         	R = Clear addressbar
    	Shift+R = Custom Buttons Menu
         	Drag and Drop a link onto the button to open it
         	On mouseover the Tooltip shows contents of your clipboard
            (Rawny's large icon version ^^ )
    */

    Initialization Tab

    this.abc = function(aEvent) {
      var adBar = gURLBar.value;
      var tabLo = content.document.location.href;
      var str = readFromClipboard();
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      if (pasteURL)	{
        gBrowser.addTab(str);
      }
      else { 
        var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
        try {
          var adrbrURL = ioService.newURI(adBar, null, null);
        } catch(ex) {
        }
        if (!(adBar == tabLo) && (adrbrURL)) {
          gBrowser.addTab(adBar);
        }
        else if (adBar.match(".co") || adBar.match(".net") || adBar.match(".org") || adBar.match(".us") || adBar.match(".biz") || adBar.match(".info") || adBar.match(".ws") || adBar.match(".edu") || adBar.match(".mil") || adBar.match(".tv") || adBar.match(".cc") || adBar.match(".ca")) {
          this.goDup();
        }
        else {
          this.goDup();
        }
      }
    }
    this.goDup = function() {
      if((content.document.location.href == gURLBar.value) || (gURLBar.value == "")) {
        gBrowser.duplicateTab(gBrowser.selectedTab);
      }
      else {
        //USE THE REGULAR 'GO' COMMAND
        handleURLBarCommand(this);
      }
    }
    this.clearURLBar = function() {
      gURLBar.value = "";
      gURLBar.focus();
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.toolTip = function(aNode) {
      var str = readFromClipboard();
      var adBar = gURLBar.value;
      var tabLo = content.document.location.href;
    this.aimg=new Array;
      var goImg = 'data:image/png;base64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gzOHp7RUNXRNZyKZ4Nbn7qKqsoJFWmEV8Hi8ngIPpJQMD48A8OmPnxGrjGL12tSW1NBY2ph7Nv0mosph0/FtbN+5vTBrhCgvIOg/N9j2+BO7XwX4edkvzupHbiwzJy3qLtbT9+t5jhw6ngtobl6Dbdlc86ifzu4TdLafZP/W17i56SZ8Xg8r62or8hLi38Wu8ZX6kevurFmmuCWXhxKoIx4qXVWsqr6FtJXGMCf5+q/TVO/0A5AMpzG+0Hlr87usqrueRCJBV9eXjI2NsPvZvaKAoGFv/XDD2trlilsi3BLhkqA7GJMGmlegehU0l4rqUmZlIkROp7mn9D7ag08C0NFxiKfa2kVB3ocvRAatpESaYgoZgbAVfKVePH43Lp+et/nUdwHlARen0id4+/OOK1fT6LHxtT0nh8Jm3JohycLJEjJHC4kPGtSO3kDkp9Heox99TCQSmduD6bHx5aCM+8fwNSzCU6YjXFOSKVnZhGtm7eU+gxX9TXz42NGCEiKu1tGeOdImB8LnMDBIixQezU1cxLi2tQR0GO8xaPq7mfd2HZyzPon5tMyNB9ZJXyjD+O9JbkuuY9+O/eJ/7WgKKpHvU9xth664+bwJopdihPw72BN6QRTd0f4LvunulMWuFQv92/LPANUKAl/q7hr7AAAAAElFTkSuQmCC";
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      if (pasteURL) { this.tooltipText = 'Click to paste & go \''+str+'\''; }
      else { 
        var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
        try {
          var adrbrURL = ioService.newURI(adBar, null, null);
        } catch(ex) {
        }
        if ((!(adBar == tabLo) && ((adrbrURL) || (adBar.match(".co") || adBar.match(".net") || adBar.match(".org") || adBar.match(".us") || adBar.match(".biz") || adBar.match(".info") || adBar.match(".ws") || adBar.match(".edu") || adBar.match(".mil") || adBar.match(".tv") || adBar.match(".cc") || adBar.match(".ca"))))) { this.tooltipText = 'Click to go to \''+adBar+'\''; this.image = goImg;}
        else { 
          if((content.document.location.href == gURLBar.value) || (gURLBar.value == "")) {
            this.tooltipText = 'Click to Duplicate Current Tab'; this.image = dupImg;}
          else {
            this.tooltipText = 'Click to Search for \''+adBar+'\''; this.image = srcImg;}
        }        
      }
    }
    //this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/address-bar-companion2.html');
    this.setAttribute("context", "");
    this.setAttribute("onclick", "if(event.shiftKey) this.showPopup(this); if(event.button == 0 && !event.shiftKey) this.abc(event); if(event.button == 1 && !event.shiftKey) this.goDup(); if(event.button == 2 && !event.shiftKey) this.clearURLBar(this);");
    this.setAttribute("onmouseover", "this.toolTip(); this.style.opacity = '.99';");
    this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, goButtonObserver);")
    this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, goButtonObserver);")
    this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, goButtonObserver);")
    this.style.opacity = '.65';
    this.setAttribute("onmouseout", "this.image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAGa0lEQVR42myVS2ycZxWGn+/7b/PPjOdij2+xHdvJxCkpIW3cSBULWiohsahoWCBW3bCLBAtYsWBPJBBCYgdEQmyqikslEmFVpUKiTRuaOonbpLk5TuyMb+PxXP65/PfvY9GAkpAjne15znvec3SE1pqPfjeOTmPibot6coxN8a2iFx94PZblH0rDfBk0IECrlkrCt3JG/bdjxtWVCfU+85MhN7bL/OTXTWr1lGq1ytLSEtVqFQATQEj5U5TM6QiFikNpR0WNODE/N3X40Ow4vu/T6XRo7LeybY9XRaJdoaNVHWmLVGaElPdB/Alo8VSYAGkc/1xrEEPDJMEEYTx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EaVpZM+uYT8xHCEh8RNTGkYI4CWj1BgxCn0ESEAQWEoOM6QBQ26txbesaF2sf8kn9Mo2hXZyswG9oVEpkZa3EfOyMQcdgDGPmjzJSyWHXtug1oef5REaISg2iOKLT81irr7F06+9cWD3Plc4yLauFHFe4jkPaT+KcXWgW8oUv70Br0DqGZBfkItaRnzE1GDC9Lshs3qS775OMxFi2pL3f4cLlJXyry6fRx2yodaLRgHzZwXd9gkaiKt2xYG5ybm92dHbHBHAyLqbu0/38F6jKcWJyiHTAnFYsuN9k784l/Jkesthmo3iD+4ObeHg0SntEboSwBbGVoDYEExtT8WL5pXtfHXt+uWJVPjcBsrnclTCKK+/+7c+6131bODbasUh7E2+OHC29UTT2YrZQdESNunGfsByBaWBaBhKbJFCkbcH4xhwnOqf8l75yfDmXZi/t3Nu5awIMuXzP6+P85jylz+7hVoooy6J/6lXnRy++MvLm8clXyA0cVq5/QOCs03N9hJWSAGkIuUGB2XCWF7KvcazyQliIwxt37tx6UNvcDk2AX77dX/P6mjtbikjB1qPPalxZ+YPtDnenpityfnR2cmTYnd0Wm+XE9suWJTNKK0KZBo7Mt2YKM818MNZorj1cuXbvxrW7d77o7LdaidBaI4T47y7JRykAXSgUZLVazT238NzIya+fPDF5ZHKxHbVnpJTTGTNTAAiSwFNKPSw5pVrtVm354vsXby1fWQ62traaWuvefwYAf7JNE6Dv/qkAAAAASUVORK5CYII='; this.style.opacity = '.65';" );
    this.setAttribute("author",'m435tr0d, rawny');						                                        // Stores Author.
    this.setAttribute("version",'2009-02-20.00');                                                 	                                // Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/address-bar-companion2.html');	        // Stores HomePage.
    this.setAttribute("dependency",'userChrome,FF 3.0.*,CB 2.0.*');					                                // Stores Dependency.
    this.setAttribute("status",'Complete');							                                        // Stores Devstatus.
    this.setAttribute("public",true);								                                // Stores Public.

    Help Tab

  18. Address Bar Site Search

    Code Tab

    /* -------------------------------------------------------------
         Site Search From Address Bar
         by GollyJer
           Enter some text in the address bar and click the button
           to execute a google site search.  Dragging text over the
           the button will also execute a search.        
       ------------------------------------------------------------- */

    Initialization Tab

    /*---------------------- Button Properties ----------------------*/
      this.setAttribute('author', 'GollyJer');
      this.setAttribute('version', '1.0');
      this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/address-bar-site-search.html');
      this.setAttribute('dependency', 'No idea.  Works for me in FF3. :-)');
      this.setAttribute('status', 'Feature Complete');
      this.setAttribute('public', true);
      this.style.opacity = '.75';
      this.tooltipText = 'Execute a Google search of the current site from the address bar.';
    /*---------------------- Events Handlers-------------------------*/
      this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);');
      this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);');
      this.setAttribute('onclick', 'this.search(event)');
    /*-------------------------- Functions --------------------------*/
      this.search = function(event, searchText) {
        if (searchText === undefined) {
          searchText = gURLBar.value;
        }
        //If not right clicked, do the search.
        if (event.button != 2) {
          //Build the search url.
          var url = "http://www.google.com/search?q=site:" + getHostname() + " " + searchText;
          //Reset the current address bar text.
          handleURLBarRevert();
          //Send url to browser to be handled natively.
          openUILink(url, event, false, true);
        }
      }
      function getHostname() {
        var hostname = "";
        var focusedWindow = document.commandDispatcher.focusedWindow;
        var doc = focusedWindow.content.document;
        if (focusedWindow && focusedWindow.content && doc) {
          if (doc.location.href.indexOf("http") == 0) {
            hostname = doc.location.hostname.match(/[^.]+\.(com|net|org)(\.[^.]+)?$/gi);
            if (hostname == null) {
              hostname = doc.location.hostname;
            }
          }
          return hostname;
        }
      }
      //  Drag & drop support from Jessef.
      //  http://custombuttons.phpbbnow.com/viewtopic.php?t=442#2250
      this.setAttribute('ondragover', 'nsDragAndDrop.dragOver(event,this);');
      this.setAttribute('ondragdrop', 'nsDragAndDrop.drop(event,this);');
      this.getSupportedFlavours = function () {
        var flavours = new FlavourSet();
        flavours.appendFlavour("text/unicode");
        return flavours;
      }
      this.onDragOver = function(e, f, s){}
      this.onDrop = function(event, dDat, session){
        this.search(event, dDat.data); //Only line not from Jessef.
      }

    Help Tab

    I execute a Google Site Search!
    Enter some text in the address bar and click to execute a search.
    Dragging & dropping text from the page will also execute a search.
     
  19. Address/Search

    Code Tab

    Initialization Tab

    this.quot = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
      switch(evt.button) {
    case 0:
    const toolbar2 = document.getElementById("urlbar-container");
    toolbar2.collapsed = !toolbar2.collapsed;
    break;
    case 1:
    this.showPopup(this);
    break;
    case 2:
    const toolbar = document.getElementById("search-container");
    toolbar.collapsed = !toolbar.collapsed;
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.quot(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L = Address | M = Menu | R = Search";
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-addresssearch-newf.html');

    Help Tab

  20. Address/Search

    Code Tab

    Initialization Tab

    this.quot = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
      switch(evt.button) {
    case 0:
    const toolbar2 = document.getElementById("urlbar-container");
    toolbar2.collapsed = !toolbar2.collapsed;
    break;
    case 1:
    this.showPopup(this);
    break;
    case 2:
    const toolbar = document.getElementById("search-container");
    toolbar.collapsed = !toolbar.collapsed;
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.quot(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L = Address | M = Menu | R = Search";
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-addresssearch-newf.html-0');

    Help Tab

  21. Advanced Home button

    Code Tab

    /*Code*/

    Initialization Tab

    var apps,google,mozilla,browser,custom,srcUrl,MItem,mPop;
    //------menu items--------
    var Img=this.image;
    var sImg=this.image;
    var abImg=this.image;
    //------Google items--------
    google=new Array;
    google.push([0,'Gmail','http://mail.google.com/mail/',Img]);
    google.push([0,'Calendar','http://www.google.com/calendar/render',Img]);
    google.push([0,'Reader','http://www.google.com/reader/view/',Img]);
    google.push([0,'Page Creator','http://pages.google.com/?pli=1',Img]);
    google.push([0,'My Account','https://www.google.com/accounts/',Img]);
    google.push([0,'Gmarks','http://www.google.com/searchhistory/',Img]);
    google.push([0,'Google Gadgets','http://desktop.google.com/plugins',Img]);
    //------Mozilla items--------
    mozilla=new Array;
    mozilla.push([0,'Mozilla.com','http://www.mozilla.com/',Img]);
    mozilla.push([0,'Mozilla Addons','http://addons.mozilla.org',Img]);
    mozilla.push([0,'Mozilla Developer','https://developer.mozilla.org',Img]);
    mozilla.push([0,'Mozilla Zine','http://www.mozillazine.org/',Img]);
    //------Browser items--------
    browser=new Array;
    browser.push([0,'Java Console','chrome://global/content/console.xul',Img]);
    browser.push([0,'Configuration Settings','about:config',Img]);
    browser.push([0,'DOM Inspector','chrome://inspector/content/inspector.xul',Img]);
    browser.push([0,'Addons','chrome://mozapps/content/extensions/extensions.xul',Img]);
    browser.push([0,'Customize Menus','chrome://menuedit/content/menueditprefs.xul',Img]);
    browser.push([0,'ChromEdit Plus SE','chrome://chromedit/content/chromedit.xhtml',Img]);
    //------Custom button items--------
    custom=new Array;
    custom.push([0,'Mozilla Zine Thread','http://forums.mozillazine.org/viewtopic.php?t=428688',Img]);
    custom.push([0,'Firefox Buttons','http://custombuttons.phpbbnow.com/viewforum.php?f=1',Img]);
    custom.push([0,'Thunderbird Buttons','http://custombuttons.phpbbnow.com/viewforum.php?f=2',Img]);
    custom.push([0,'Requests and Ideas','http://custombuttons.phpbbnow.com/viewforum.php?f=10',Img]);
    custom.push([0,'Private Messages','http://custombuttons.phpbbnow.com/privmsg.php?folder=inbox',Img]);
    //------Main Menu items--------
    apps=new Array;
    apps.push([0,'Add temporary bookmark','1',abImg]);
    apps.push([0,'separator']);
    apps.push([1,'Google Links',google,sImg]);
    apps.push([1,'Mozilla Links',mozilla,sImg]);
    apps.push([1,'Browser Links',browser,sImg]);
    apps.push([1,'Custom button Links',custom,sImg]);
    apps.push([0,'Firefox extensions','https://addons.mozilla.org/firefox/',Img]);
    apps.push([0,'Grease Monkey','http://userscripts.org/',Img]);
    apps.push([0,'XUL references','http://xulplanet.com/references/elemref/ref_textbox.html',Img]);
    apps.push([0,'UserChrome.js','http://forums.mozillazine.org/viewtopic.php?t=397735&postdays=0&postorder=asc&postsperpage=15&start=0',Img]);
    apps.push([0,'separator']);
    //------/menu items-------
    MItem=function(apps,value){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',apps[value] [1]);
      mItem.value = apps[value] [2];
      mItem.tooltipText = apps[value] [2];
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
     mItem.setAttribute('image',apps[value] [3]);
    //			alert(apps[value] [1]);
      return mItem;
    }
    nItem=function(label,value){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      mItem.value = value;
      mItem.tooltipText = label;
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',document.getElementById("page-proxy-favicon").src);
      return mItem;
    }
    this.onMouseOver = function() {
      var homePage = gHomeButton.getHomePage();
      this.tooltipText = homePage;
    }
    //this.orient="vertical";
    mPop=document.createElement('menupopup');
    mPop=createMenu(mPop,apps);
    function createMenu(menu,aray)
    {
    	for (var i=0;i<aray.length;i++)
    	{
    		if(aray[i] [0]==0)
    		{
    			 if (aray[i] [1] =='separator')
    			 {
    			  menu.appendChild(document.createElement('menuseparator'));
    			 }
    			 else
    			 {
    			  menu.appendChild(MItem(aray,i));
    			 }
    		 }
    		 else
    		 {
    			var sMenu=document.createElement('menu');
    			sMenu.setAttribute('label',aray[i] [1]);
    			sMenu.setAttribute('class','menuitem-iconic bookmark-item');
    			sMenu.setAttribute('image',aray[i] [3]);
    			var subMenu=document.createElement('menupopup');
    			subMenu.setAttribute('orient','horizontal');
    			subMenu=createMenu(subMenu,aray[i] [2]);
    			sMenu.appendChild(subMenu);
    			menu.appendChild(sMenu);
    			//alert(subMenu.lastChild());
    		 }
    	}	
    	return menu;
    }
    this.Go=function(evt)
    {
    	var site=evt.target.value;
    	if(site==1)
    	{
    		this.AddMenuItem();
    	}
    	else if(site==-1)
    	{
    		gBrowser.selectedTab = gBrowser.addTab(gHomeButton.getHomePage());
    	}
      	else
    	{
    		gBrowser.selectedTab = gBrowser.addTab(site);
    	}
    }
    function getAddress() {
      var urlbar;
      urlbar= document.getElementById("urlbar");
      return urlbar.value;
    }
    this.AddMenuItem=function()
    {
      mPop.appendChild(nItem(content.document.title,getAddress()));
    }
    this.setAttribute("onmouseover", "this.onMouseOver()");
    this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, homeButtonObserver)");
    this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, homeButtonObserver)");
    this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, homeButtonObserver)");
    this.setAttribute("oncommand", "this.Go(event);");
    this.tooltipText = "[L=HomePage| M=Temporary Bookmark | R=custom button menu]";
    this.appendChild(mPop);
    this.type = "menu-button";
    this.value=-1;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/advance-home-button.html');

    Help Tab

  22. Alarm (status bar version)

    Code Tab

    /*Code*/
    /* absolute examples
          const target = "Sep 6 2010 3:30:00 PM";
          const target = "2010, 9, 6, 15:30:00";
          const target = date(0) +  "6:00:00 PM"; // today
          const target = date(1) + "12:30:00 AM"; // tomorrow
          const target = next(0);                 // next on the hour
          const target = next(15);                // next quarter past the hour
          const target = next(30);                // next half past the hour
          const target = next(45);                // next quarter to the hour
       relative examples
          const target = [1, 15, 0];              // 1 hour, 15 minutes
          const target = [0, 3, 30];              // 3 minutes, 30 seconds
          const target = [0, 0, 10];              // 10 seconds
    */
    const target = [0, 0, 10];
    function date(increment) {
      return new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + increment).
        toDateString() + String.fromCharCode(32);
    }
    function next(minute) {
      if (minute > 0 && minute < 60) {
        return new Date(Math.floor((new Date().getTime() + (60 - minute) * 60000) / 3600000) * 3600000 + minute * 60000).
          toString();
      } else {
        return new Date(Math.floor((new Date().getTime() + (60 -      0) * 60000) / 3600000) * 3600000 +      0 * 60000).
          toString();
      }
    }
    function absolute(string) {
      return new Date(string);
    }
    function relative(hour, minute, second) {
      return new Date(beginTime.getTime() + hour * 3600000 + minute * 60000 + second * 1000);
    }
    function count(t0, t1) {
      var millisecond = t1.getTime() - t0.getTime();
      var hour = Math.floor(millisecond / 3600000);
      var minute = Math.floor(millisecond % 3600000 / 60000);
      var second = Math.floor(millisecond % 3600000 % 60000 / 1000);
      if (t0 > t1) {
        hour = 0; minute = 0; second = 0;
        clearInterval(that.tick); delete that.tick;
        removeElementById("statusbar-cb2-alarm");
        sound.play(ios.newFileURI(file));
      }
      hour = (hour < 10 ? "0" : "") + hour;
      minute = (minute < 10 ? "0" : "") + minute;
      second = (second < 10 ? "0" : "") + second;
      return hour + "h " + minute + "m " + second + "s";
    }
    var ios = Components.classes["@mozilla.org/network/io-service;1"].
      getService(Components.interfaces.nsIIOService);
    var sound = Components.classes["@mozilla.org/sound;1"].
      getService(Components.interfaces.nsISound);
    var file = Components.classes["@mozilla.org/file/local;1"].
      createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath("C:\\WINDOWS\\Media\\notify.wav");
    if (this.tick) {
      clearInterval(this.tick); delete this.tick;
      removeElementById("statusbar-cb2-alarm");
    } else {
      var that = this;
      var beginTime = new Date();
      if (target.constructor == String) {
        var endTime = absolute(target);
      } else {
        var endTime = relative(target[0], target[1], target[2]);
      }
      removeElementById("statusbar-cb2-alarm");
      const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
      var statusBar = document.getElementById("status-bar");
      var statusBarPanel = document.createElementNS(kXULNS, "statusbarpanel");
      statusBarPanel.setAttribute("id", "statusbar-cb2-alarm");
      statusBarPanel.setAttribute("tooltiptext", endTime.toLocaleString());
      statusBarPanel.setAttribute("insertbefore", "statusbar-progresspanel");
      statusBar.appendChild(statusBarPanel);
      this.tick = setInterval(function() {
        var currentTime = new Date();
        statusBarPanel.setAttribute("label", count(currentTime, endTime));
      }, 10);
    }
    function removeElementById(id) {
      var element = document.getElementById(id);
      if (element) {
        element.parentNode.removeChild(element);
      }
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "2.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/alarm.html');
    this.setAttribute("dependency", "FF 3.*, CB2 3.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  23. Alarm (window version)

    Code Tab

    /*Code*/
    /* absolute examples
          const target = "Sep 6 2010 3:30:00 PM";
          const target = "2010, 9, 6, 15:30:00";
          const target = date(0) +  "6:00:00 PM"; *//* today                      *//*
          const target = date(1) + "12:30:00 AM"; *//* tomorrow                   *//*
          const target = next(0);                 *//* next on the hour           *//*
          const target = next(15);                *//* next quarter past the hour *//*
          const target = next(30);                *//* next half past the hour    *//*
          const target = next(45);                *//* next quarter to the hour   *//*
       relative examples
          const target = [1, 15, 0];              *//* 1 hour, 15 minutes         *//*
          const target = [0, 3, 30];              *//* 3 minutes, 30 seconds      *//*
          const target = [0, 0, 10];              *//* 10 seconds                 *//*
    */
    const target = [0, 0, 10];
    function date(increment) {
      return new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + increment).
        toDateString() + String.fromCharCode(32);
    }
    function next(minute) {
      if (minute > 0 && minute < 60) {
        return new Date(Math.floor((new Date().getTime() + (60 - minute) * 60000) / 3600000) * 3600000 + minute * 60000).
          toString();
      } else {
        return new Date(Math.floor((new Date().getTime() + (60 -      0) * 60000) / 3600000) * 3600000 +      0 * 60000).
          toString();
      }
    }
    function load() {
      function absolute(string) {
        return new Date(string);
      }
      function relative(hour, minute, second) {
        return new Date(beginTime.getTime() + hour * 3600000 + minute * 60000 + second * 1000);
      }
      function clock(string) {
        return (string.length == 10 ? "0" : "") + string;
      }
      function count(t0, t1) {
        var millisecond = t1.getTime() - t0.getTime();
        var hour = Math.floor(millisecond / 3600000);
        var minute = Math.floor(millisecond % 3600000 / 60000);
        var second = Math.floor(millisecond % 3600000 % 60000 / 1000);
        var decimal = Math.floor(millisecond % 3600000 % 60000 % 1000 / 10);
        if (t0 > t1) {
          hour = 0; minute = 0; second = 0; decimal = 0;
          clearInterval(that.tick); delete that.tick;
          sound.play(ios.newFileURI(file));
          close();
        }
        hour = (hour < 10 ? "0" : "") + hour;
        minute = (minute < 10 ? "0" : "") + minute;
        second = (second < 10 ? "0" : "") + second;
        decimal = (decimal < 10 ? "0" : "") + decimal;
        return hour + ":" + minute + ":" + second + "." + decimal;
      }
      var ios = Components.classes["@mozilla.org/network/io-service;1"].
        getService(Components.interfaces.nsIIOService);
      var sound = Components.classes["@mozilla.org/sound;1"].
        getService(Components.interfaces.nsISound);
      var file = Components.classes["@mozilla.org/file/local;1"].
        createInstance(Components.interfaces.nsILocalFile);
      file.initWithPath("C:\\WINDOWS\\Media\\notify.wav");
      if (this.tick) {
        clearInterval(this.tick); delete this.tick;
      } else {
        var that = this;
        var beginTime = new Date();
        if (target.constructor == String) {
          var endTime = absolute(target);
        } else {
          var endTime = relative(target[0], target[1], target[2]);
        }
        this.tick = setInterval(function() {
          var currentTime = new Date();
          document.getElementById("clock1").value = clock(beginTime.toLocaleTimeString());
          document.getElementById("clock2").value = clock(currentTime.toLocaleTimeString());
          document.getElementById("clock3").value = clock(endTime.toLocaleTimeString());
          document.getElementById("count1").value = count(beginTime, currentTime);
          document.getElementById("count2").value = count(currentTime, endTime);
        }, 10);
      }
    }

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(event) {
      var codeTab = document.getElementById(this.id).getAttribute("cb-oncommand");
      var helpTab = document.getElementById(this.id).getAttribute("Help");
      var tag = new Array("<script><!\x5bCDATA\x5b", "\x5d\x5d></script>");
      var xml = helpTab.replace("</window>", tag[0] + codeTab + tag[1] + "</window>");
      var url = "data:application/vnd.mozilla.xul+xml;text/plain," + xml;
      var feature = "chrome,centerscreen,width=220,height=220";
      window.openDialog(url, "", feature);
    }
    this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "2.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/alarm.html');
    this.setAttribute("dependency", "FF 3.*, CB2 3.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

    <?xml version="1.0"?>
    <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    <window title="Alarm" onload="load();" align="center" class="dialog" orient="vertical"
            xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
      <keyset>
        <key keycode="VK_ESCAPE" oncommand="close();" />
      </keyset>
      <vbox>
        <label id="clock1" style="font-family: monospace; font-size: xx-large; font-weight: bold" />
        <label id="clock2" style="font-family: monospace; font-size: xx-large; font-weight: bold" />
        <label id="clock3" style="font-family: monospace; font-size: xx-large; font-weight: bold" />
        <label id="count1" style="font-family: monospace; font-size: xx-large; font-weight: bold" />
        <label id="count2" style="font-family: monospace; font-size: xx-large; font-weight: bold" />
        <button label="CANCEL" oncommand="load();" style="font-size:  x-large; font-weight: bold" />
      </vbox>
    </window>
  24. Alert Box Demo

    Code Tab

    var cbTitle = "My Title"; // Title of the alert box
    var cbDesc = "My Description/Instructions"; // Instructions/Info just before the button
    custombuttons.alertBox(cbTitle, cbDesc);

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081210.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  25. Alert Slide Demo

    Code Tab

    var cbTitle = "My Title"; // Title of the sliding alert
    var cbDesc = "My Description/Info"; // Instructions/Info to describe the event
    custombuttons.alertSlide(cbTitle, cbDesc);

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081210.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  26. All Bars

    Code Tab

    /*Code*/
    //Toggle Navigation Toolbar
    //Toggle Bookmarks Toolbar
    //Toggle Status Bar
    var toolbar;
    toolbar = document.getElementById("nav-bar");
    toolbar.collapsed = !toolbar.collapsed;
    toolbar = document.getElementById("PersonalToolbar");
    toolbar.collapsed = !toolbar.collapsed;
    toolbar = document.getElementById("status-bar");
    document.getElementById("toggle_taskbar").setAttribute("checked", toolbar.hidden ? "true" : "false");
    toolbar.hidden = !toolbar.hidden;

    Initialization Tab

    /*Initialization code*/
    this.tooltipText = "Toggle navigation toolbar, status bar and bookmarks toolbar";
    this.setAttribute('author','beerman, morat');
    this.setAttribute('version','20090601.02');
    this.setAttribute('dependency','FF 3.0.*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-toolbars.html');

    Help Tab

    Toggles the navigation toolbar, status bar and the bookmarks toolbar with one click.
  27. All Bars (persistent)

    Code Tab

    /*Code*/
    //Toggle Navigation Toolbar
    //Toggle Bookmarks Toolbar
    //Toggle Status Bar
    //Persist Across Browser Sessions
    var toolbar;
    toolbar = document.getElementById("nav-bar");
    toolbar.collapsed = !toolbar.collapsed;
    document.persist("nav-bar", "collapsed");
    toolbar = document.getElementById("PersonalToolbar");
    toolbar.collapsed = !toolbar.collapsed;
    document.persist("PersonalToolbar", "collapsed");
    toolbar = document.getElementById("status-bar");
    document.getElementById("toggle_taskbar").setAttribute("checked", toolbar.hidden ? "true" : "false");
    toolbar.hidden = !toolbar.hidden;
    document.persist("status-bar", "hidden");
    document.persist("toggle_taskbar", "checked");

    Initialization Tab

    /*Initialization code*/
    this.tooltipText = "Toggle navigation toolbar, status bar and bookmarks toolbar";
    this.setAttribute('author','beerman, morat');
    this.setAttribute('version','20090601.01');
    this.setAttribute('dependency','FF 3.0.*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-toolbars.html');

    Help Tab

    Toggles the navigation toolbar, status bar and the bookmarks toolbar with one click.
    Their states persist across browser sessions.
  28. All-in-one customization button

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label); 
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
    	if ( typeof aios_getObjects == "function" ) {
    		toggleSidebar("viewAddonsSidebar");
    	} else {
    		let title = "Extensions in Sidebar"
    		let link = "chrome://mozapps/content/extensions/extensions.xul";
    		if (/Extensions \[/.test( document.getElementById('sidebar-title').getAttribute('value') ) ) {
    			toggleSidebar();
    		} else {
    			if (/extensions\.xul$/.test( link )) {
    				toggleSidebar('viewWebPanelsSidebar', true);
    				document.getElementById('sidebar').setAttribute('src', link );
    				document.getElementById('sidebar-title').setAttribute('value', title );
    			} else {
    				openWebPanel( title, link );
    			}
    		}
    	}
    };
    this.sleftclick = function(evt)
    {
      openDialog("chrome://custombuttons/content/edit.xul", "", "chrome,resizable,dialog=no,modal=no", null);
    };
    this.midclick = function(evt)
    {
      toggleSidebar('viewStylishSidebar');
    };
    this.smidclick = function(evt)
    {
      inspectDOMDocument(_content.document);
    };
    this.rightclick = function(evt)
    {
      toggleSidebar("viewThemesSidebar");
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.tooltipText = "L: Toggle add-ons sidebar"+"\n"+"M: Toggle Stylish sidebar (currently broken)"+"\n"+"R: Toggle themes sidebar (currently broken)"+"\n"+"Shift+L: New Custom Buttons² Button"+"\n"+
    "Shift+M: Open the DOM inspector"+"\n"+"Shift+R: Custom Buttons² context menu"
    this.setAttribute('author','KuRmA, nicholas, rawny');
    this.setAttribute('version','2 (2009-03-14)');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/all-one-customization-button.html');

    Help Tab

    Left click: Toggle add-ons sidebar
    Middle click: Toggle Stylish sidebar (currently broken)
    Right click: Toggle themes sidebar (currently broken)
    Shift+Left click: Add new Custom Buttons² Button
    Shift+Middle click: Open the DOM inspector
    Shift+Right click: Custom Buttons² context menu
  29. Asterisk²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [*'+']Clipboard\n\nHTML: <l'+'i>Clipboard</l'+'i>';
    this.ss = [
      { label: 'BBCode', open: '[*'+']', open1: '[*'+']%h', close: '', sItemId: '' },
      { label: 'HTML'  , open: '<l'+'i>', open1: '<l'+'i>%h</l'+'i>', close: '</l'+'i>', sItemId: '' },
      { label: 'WIKI'  , open: '*  ', open1: '*  %h', close: '', sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function( oBtn ){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      var nLen = 0;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref = 0;
          this.checked = false;
          break;
        case 0:
          x.text += (e.shiftKey)? '\n' + x.listo : x.listo;
          nLen = x.text.length
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          if ( x.listc ) { // In Wiki there is no closing tag
            this.pref=1;
            this.checked = true;
          }
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.cBoard = x.Highlight;
        this.processLines( e, x )
      }
    }; // End this.doLeft*/
    /*----------------------------------------------------
      Function:  this.processLines( e, x )
      Args:  e, x
      Returns: sProcText
      Calls:
      Purpose: process all Highlighted/gClipboard lines and apply
         tags to non empty lines
    ----------------------------------------------------*/
    this.processLines = function( e, x )
    {
      var nLen = 0;
      x.arr = (e.ctrlKey)? x.cBoard.split('\n') : [x.cBoard];
      x.n = (e.shiftKey)? '\n' : '';
      for (var i in x.arr) {
        if ( x.arr[i].length > 0 ) {
          x.n += x.liste.replace(/%h/,x.arr[i])
          x.n += (i < x.arr.length-1 ) ? '\n' : '';
        } else {
          x.n += '\n';
        } // End if ( x.arr.length > 2 )
      } // End for
      // x.n += ( x.cBoard.length > 0 ) ? x.listc : '';
      x.text += x.n;
      nLen = x.text.length
      x.text += x.eBlock;
      x.theBox.value = x.text;
      x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
      x.arr =[];
    }; // End function this.processLines( e, x, sText )
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if ( e.ctrlKey ) {
        this.processLines( e, x )
      } else {
        x.n = ( e.shiftKey )? '\n' : '' ;
        x.liste = x.n + x.liste
        x.n = x.liste.replace(/%h/,x.theBox.value.substring(x.startPos, x.endPos).replace(/\n/g, "\n"));
        var nLen = x.n.length;
        x.text += x.n;
        x.text +=x.theBox.value.substring(x.endPos, x.theBox.value.length);
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.startPos+nLen;
        x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      } // End if ( e.ctrlKey )
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-list-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [*]Highlighted
    	 HTML: <li>Highlighted</li>	
    	 WIKI:   *  Highlighted
    	 OR nothing highlighted
    	    First click = [*], <li>, *
     M =        ( Highlighted text will be replaced )
    	 BBCode: [*]Highlighted
    	 HTML: <li>Highlighted</li>	
     M+Shift =  ( Highlighted text will be replaced )
    	 BBCode: \n[*]Clipboard
    	 HTML: \n<li>Clipboard</li>	
    	 WIKI: \n*  Clipboard
     M+Ctrl =   ( Highlighted text will be replaced )
    	 BBCode: [*]Clipboard
    			[*]contents
    	 HTML:	<li>Clipboard</li>
    		     <li>contents</li>	
    	 WIKI:	*  Clipboard
    		     *  contents
     R = Context Menu with tag options and submenu for CB Context
  30. Auto Update Check v 1.03

    Code Tab

    /*Code*/
    /*
    To test the operation of this button - change the version number in the attribute block of the initialise tab to something less than it currently is.  I.e. The thirteenth to the twelfth...
      ***  SEE the help tab for usage instructions.  ***
    */
    /* +============================================================
        U P D A T E   C H E C K   -   C O D E   T A B   S C R I P T
       ============================================================+ */
        if(this.getAttribute("checkdone") == "false")
        {
          this.checkforupdate();
        }
        else
        {
          // mycheckwindow.close();
        }
    /* +============================================================
        E N D   O F   U P D A T E   C H E C K   -  C O D E   T A B
       ============================================================+ */

    Initialization Tab

    /*Initialization code*/
    /* +============================================================
        U P D A T E   C H E C K   -   I N I T   T A B   V A R S
       ============================================================+ */
    var mycheckwindow = "";
    var mytarget = "";
    var currentversion = "";
    var alertstring = "";
    var buttonname = "";
    this.setAttribute("checkdone", "false");
    /* +=============================================================
        E N D   O F   U P D A T E   C H E C K   -   I N I T   V A R S
       =============================================================+ */
    /* +=================================================================
        U P D A T E   C H E C K   -   I N I T   T A B   F U N C T I O N S
       =================================================================+ */
    this.checkforupdate = function()
    {
      // Set checkdone to true so it runs first time only
        this.setAttribute("checkdone", "true");
      // grab the current version and name of the button
        currentversion = this.getAttribute("version");
        buttonname = this.getAttribute("label");
      // get the homepage and open a window for it
        var thishp = this.getAttribute("homepage");
      // open a minimal window mostly out of sight
        mycheckwindow = window.open(thishp, "updatecheck","height=80,width=370,screenX=-400,screenY=-400,dialog=yes");
      // Give the focus back to the user
         mycheckwindow.blur();
      // Once the window is loaded - go get the version info
         mycheckwindow.onload = checkthepage();
    } // END of check for update
    function checkthepage()
    {
      // find the post content by ID
        mytarget = mycheckwindow.document.getElementById("cb-content");
      // Wait for the page to completely render then step through...
      if(!mytarget)
      {
        // clear any existing time out
        if(waitforpage)
        {
          clearTimeout(waitforpage);
        }
        var waitforpage = setTimeout(function(){checkthepage()}, 1000);
      }
      else
      {
        clearTimeout(waitforpage);
        // step through DOM elements to the button link
        mytarget = mycheckwindow.document.getElementById("cb-content").firstChild;
      // keep the post content DIV for the scrollTo, then keep going.
        var myscroll = mytarget.parentNode.parentNode.parentNode.parentNode;
      // look for the link href - otherwise it's likely to be
      // an FF or CB2 compatibility icon. If so - step through...
        while(!mytarget.href)
        {
          mytarget = mytarget.nextSibling;
        }
      // We have the content of the button link code so lets call it a string
        var buttonstr = mytarget.href;
      // look for the button version text
        var tmp = escape("version','");
        var verstart = buttonstr.lastIndexOf(tmp);
      // cut the front off after that text
        var firstcut = buttonstr.substring(verstart + 16, buttonstr.length);
        // alert("firstcut = " + firstcut);
      // look for the end of version bit
        var tmp = escape("'");
        var verend = firstcut.indexOf(tmp);
      // cut all the tail end off
        var secondcut = firstcut.substring(0, verend);
      // rename to help us keep track
        var postedversion = secondcut;
      // compare the posted version and the current version
      //
      // (If you are not using standard button version notation you may
      //  need to change the following test from < to !== )
       // alert("posted = " + postedversion + " current = " + currentversion);
        if(currentversion < postedversion)
        {
          // use a confirm window. Move the check window if user clicks OK
          // otherwise just close it on cancel
          alertstring = "There is a newer version of ";
          alertstring += buttonname + " available.\n\n";
          alertstring += "The new version number is " + postedversion + "\n\n";
          alertstring += "Your version is " + currentversion + "\n\n";
          alertstring += "Click on " + '"' + "OK" + '"' + " to open the ";
          alertstring += "button home page and download the update now.";
          if(confirm(alertstring))
          {
            // mycheckwindow.resizeTo(370,110);
            // mycheckwindow.title = "Update check";
            // calculate for scroll to
            var mydown = myscroll.offsetTop;
            var myinset = myscroll.offsetLeft;
            mycheckwindow.scrollTo(myinset,mydown);
            // calculate for centre of screen
            var myleft = screen.availWidth/2 - mycheckwindow.innerWidth/2;
            var mytop = screen.availHeight/2 - mycheckwindow.innerHeight/2;
            mycheckwindow.moveTo(myleft,mytop);
            mycheckwindow.focus();
            mytarget.blur();
          }
          else
          {
            mycheckwindow.close();
          }
        } // END of comparison 'true'
        else
        {
          // just close the window
          mycheckwindow.close();
        }
      } // end of mytarget else
    } // END of check the page
    /* +=================================================================
        E N D   O F   U P D A T E   C H E C K   -   I N I T   F U N C S.
       =================================================================+ */
    /* +=================================================================
        T O   H A V E   T H I S   B U T T O N   C H E C K   I T S E L F
        F O R   U P D A T E S   ** B E F O R E **   S H O W I N G   T H E
        C O N T E X T   M E N U   --   U N C O M M E N T   B E L O W :-
       =================================================================+ */
    /*
    this.rightclick = function(evt)
    {
        if(this.getAttribute("checkdone") == "false")
        {
          this.checkforupdate();
        }
        else
        {
          custombuttons.gQuot.gShowPopup(this);  
        }
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); 
    */
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','squeaky');
    this.setAttribute('version','20080422.1.03');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/auto-update-check.html');
    this.setAttribute('dependency','FF2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    /* +++----------------------- help information for this button -----------------------+++ */
    Most buttons do not need an update check, but where you have an operational button and plan to add further features at a later date - adding this update check will let button users know automatically that an update is available.
    It is designed to run the first time that a user clicks on the button in any given session.  This is a deliberate choice over the possibility of doing the check on browser start up - it's a shade less obtrusive and users are likely to start the browser more often than they use a button.
    (NOTE:- It will be worthwhile keeping this button on a toolbar because it too is likely to need updates as the forum software changes. You'll be notified of updates when you click on it to copy the code into your target button.)
    (TIP:- This help file is likely to be too long for the alert window that opens when you click on "help" in the context menu. Instead, click on "Edit" and then click on this help tab)
    U S I N G   T H E   U P D A T E   C H E C K   I N   Y O U R   B U T T O N
    =========================================================================
    C O D E :-
    ----------
    Copy the script lines from this "Code Tab" into the code tab of your target button. It should be pasted as THE LAST bit of code. This is to ensure that your button will operate normally and do what it is supposed to do before the update check starts.
    It's up to you if you want to copy the large comment markers too.
    I N I T I A L I S E :-
    ----------------------
    While you can copy the entire contents (except the attribute block) of this "Initialise tab" in one piece into the init tab of your target button - it's good practice to have the variables list at the top and the functions lower down. 
    It's up to you.
    Again, copying the large comment markers (or not) is up to you.
    T E S T I N G   T H E   B U T T O N :-
    --------------------------------------
    To test the operation of your button after uploading (see below) - change the version number in the attribute block of the initialise tab to something less than it currently is.  I.e. The thirteenth to the twelfth...
    Don't forget to change it back after your test.
    S E T T I N G   U P
    ===================
    My usual practice when posting a button is to start a post in the Database and just write something like "Placer. Back with the button in a moment." and then click on submit.
    I then copy the URL of the post (which is the homepage URL) for the attribute block.
    This URL is of the form:-
    "http ://custombuttons2.com/forum/viewtopic.php?f=60&t=832&p=2392#p2392"
    Alternatively you can use the more standard link form:-
    "http ://custombuttons2.com/forum/viewtopic.php?f=60&t=832"
    Having edited your homepage attribute you can post your button BB-code link in the usual way.
    T I P :-
    ========
    If you are about to start a new button which you think will later have a need for updates - you "could" just clone this button, change the name and image, and then go right ahead with your script.
    Not forgetting to edit the attribute block.
    
  31. AutoCopy

    Code Tab

    /*CODE*/
    var autopasteEnabedImage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Ba3D7lcDgTAaxiwl1ZgFpfClAqWVJBGVvpaWxUCQXCde/wPrc/2vjty/mhISTCnl+edTpivn4I+PAz+zbfgS0vw9hyD2t0MQygoywYLeAlcA1uw7C6S4p0S7nBBEgyvh+zTp+E5+hzwwouI1dVBxWJQFz5Faf9VVLkldKWEMC0BpaB1+gO24lpXhRD+jfJSJc6eJbRHYSaTcEUiSAaDsH4fgc+2wKf+UrtdOkuVbEk3+ozvI207YtqJcDDlzm3UJbc27eIfvC8dzU3MyuhQRBB6Dr6GHUgLG46xMXC3lzyz02jHv+ECGPc3RaO3WNBfZF6uf+nGre4euCpDIhe7r/L6mtJTcZVOJdTqPzMyG90rZ1r3SKeRts2CAH0om6fv3p4eID2t+LrJMFDfVR5fmMX8pV8pa2kkBGAKBVMwGBbIlAysYD86g2m1Fozgcs3jybbERALCBs2N38PhT/58ShmJt/KKx4iYCWIGSNMBlSWiPMCyipDxkZXSXK5cPMf/7jteOxrdv9P6H00LytiG/sXgAAAAAElFTkSuQmCC";
    var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
    if(prefs.getBoolPref("custombuttons.autocopy.autopasteEnabled")) {
      prefs.setBoolPref("custombuttons.autocopy.autopasteEnabled", false);
      this.image = autopasteDisabledImage;
    } else {
      prefs.setBoolPref("custombuttons.autocopy.autopasteEnabled", true);
      this.image = autopasteEnabedImage;
    }
    

    Initialization Tab

    /*Initialization Code*/
    var lastSelection = "";
    var autopasteEnabedImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsSAAALEgHS3X78AAADeUlEQVQ4jQXBSWicZRgH8P/zfu83S7aZzGSyTCZLY1IySdSDlkADHrzpoaAtCAUFIxQR8WqXU/HgTRB6VqhCe+lBa22LBEMQreLSkIjN5kzWcTLJ7DPf9r7v4+9He8ceLt7MgbXBXDZBQ+37XPh7CdnXrqIrnoYQAq3SNraWP58emDjnZeYXvTtLef3J22e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hQRBB6Dr6GHUgLG46xMXC3lzyz02jHv+ECGPc3RaO3WNBfZF6uf+nGre4euCpDIhe7r/L6mtJTcZVOJdTqPzMyG90rZ1r3SKeRts2CAH0om6fv3p4eID2t+LrJMFDfVR5fmMX8pV8pa2kkBGAKBVMwGBbIlAysYD86g2m1Fozgcs3jybbERALCBs2N38PhT/58ShmJt/KKx4iYCWIGSNMBlSWiPMCyipDxkZXSXK5cPMf/7jteOxrdv9P6H00LytiG/sXgAAAAAElFTkSuQmCC";
    function autocopyStart(e) {
      lastSelection = getBrowserSelection();
    }
    function autocopyStop(e) {
      var selection = getBrowserSelection();
      if(selection && selection != lastSelection) {
        goDoCommand('cmd_copy');
        var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
        if(prefs.getBoolPref("custombuttons.autocopy.autopasteEnabled")) {
          var searchbar = document.getElementById('searchbar');
          searchbar.removeAttribute("empty");
          searchbar.value = getBrowserSelection();
          var evt = document.createEvent("Events");
          evt.initEvent("oninput", true, true);
          searchbar.dispatchEvent(evt);
        }
      }
    }
    window.addEventListener("mousedown", autocopyStart, false);
    window.addEventListener("mouseup", autocopyStop, false);
    this.setAttribute("style", "-moz-appearance: statusbarpanel;");
    var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
    try {
      prefs.getBoolPref("custombuttons.autocopy.autopasteEnabled");
    } catch(e) {
      prefs.setBoolPref("custombuttons.autocopy.autopasteEnabled", true);
    }
    if(prefs.getBoolPref("custombuttons.autocopy.autopasteEnabled")) {
      this.image = autopasteEnabedImage;
    } else {
      this.image = autopasteDisabledImage;
    }
    this.setAttribute("author",'ithinc');								// Stores Author.
    this.setAttribute("version",'20080225.02');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/autocopy-autopaste-search-bar.html');      // Stores HomePage.
    this.setAttribute("dependency",'FF 2.0.0.*,CB2 2.0.*');			// Stores Dependency.
    this.setAttribute("status",'Development');								// Stores Devstatus.
    this.setAttribute("public",true);		

    Help Tab

    Click by left button will toggle the state of auto pasting to the search bar
  32. AutoFaviconize Domain

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    if (typeof faviconize.toggle != 'function') {
      alert( "This Button requires the FaviconizeTab Extension" );
      this.disabled(true);
    }
    this.faviconizeIt = function() {
      if (gBrowser.mCurrentTab.hasAttribute("faviconized")) {
        return;
      }
      else {
        faviconize.toggle(gBrowser.mCurrentTab);
      }
    }
    this.leftclick = function(evt) {
      var loc = getBrowser().contentWindow.location;
      var path = loc.href;
      path = path.replace(/^.*:\/\/[^\/]*\//, '');                // strip scheme and host
      path = path.replace(/\/$/, '');                             // strip trailing slash
      var host = loc.host;
      var scheme = loc.protocol+'//';
      var emptyPath = ('' == path);
      if(host.indexOf("www.") == 0) host=host.substr(4);
      var link=" *"+host+"*";
      var faviconizePref=custombuttons.getPrefs("extensions.faviconizetab.auto.includes"); //Gets autofaviconizetab preference
      if (faviconizePref.match(link)) {
        custombuttons.alertSlide("AutoFaviconize Button didn't add","\"*" + host + "*\" to the AutoFaviconize Tab Preferences (already added)"); 
      }
      else {
        custombuttons.setPrefs("extensions.faviconizetab.auto.includes",faviconizePref.concat(link));
        custombuttons.alertSlide("AutoFaviconize Button has added","\"*" + host + "*\" to the AutoFaviconize Tab Preferences");
      }
      this.faviconizeIt();
    };
    this.midclick = function(evt) {
      openDialog("chrome://faviconizetab/content/addon/prefs.xul");
    }; this.cleftclick = function(evt) { this.midclick(evt); }
    this.rightclick = function(evt) {
      faviconize.toggle(gBrowser.mCurrentTab);
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080812.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/faviconize-autofaviconize-domain-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText = this.label+"\nL: Add Current Domain to Autofaviconize Preferences\nM: Open FaviconizeTab Options Dialog\nR: Toggle Current Tab's Faviconized Status";

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  33. autoHideStatusbar

    Code Tab

    /*Code*/

    Initialization Tab

    // get the statusbar item's enabled attribute
    this.val = document.getElementById("autohidestatusbar-statusbar-item").getAttribute("Enabled");
    // function for swaping image
    this.swapImg = function() {
      var ahsBtn = document.getElementById("autohidestatusbar-statusbar-item");
      var ahsImg = window.getComputedStyle(ahsBtn, null).getPropertyValue("list-style-image");
      var rExp = /url\((.*?)\)/i;
      ahsImg = ahsImg.replace(rExp, "$1");
      if (ahsImg.match("AHS-on")) this.image = ahsImg;
      else this.image = ahsImg;
    }
    this.leftclick = function(evt) {
      AHS.toolbarClick(evt);
      this.swapImg();
    }
    this.rightclick = function(evt) {
      openDialog("chrome://autohidestatusbar/content/prefs.xul", "autoHideStatusbar-options", "chrome, dialog=no, centerscreen");
    }
    // observe the ahs enabled status
    this.PS = Components.classes['@mozilla.org/preferences-service;1']
                        .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.swapImg.bind(this);
    this.PS.addObserver(this.val,this.ob,false);
    this.swapImg();
    // mouseclick handlers
    this.setAttribute('onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.setAttribute('ondblclick', 'custombuttons.gQuot.mHandler( event, this )');
    // mouseovers
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    // button attributes
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081211.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/autohidestatusbar.html');
    

    Help Tab

    Help not developed for
    <label> button
    custombuttons-button<id>.
    Alt Image - chrome://autohidestatusbar/skin/AHS-off-s.png
    
  34. Avant Browser.Ran with Wine

    Code Tab

    /*CODE*/
    var page = gBrowser.currentURI;
    var browser = "/home/nicholas/.wine/drive_c/Program Files/Avant Browser/avant.exe";
    var file =  Components.classes["@mozilla.org/file/local;1"]
                          .createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath(browser);
    var process = Components.classes["@mozilla.org/process/util;1"]
                            .createInstance(Components.interfaces.nsIProcess);
    process.init(file);
    process.run(false, [page.spec], 1);
    return true;
    

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-buttons-linux.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button launches the current page in Avant Browser
    It works on the linux operating system.
  35. B'Marks|Addons|Source

    Code Tab

    /*Code*/
    /**	Help Info:
    '**************************************************
     To use:
    	Left Click - Open sidebar with Bookmarks
    	Mid Click - Open Addons Manager Dialog.
    	Right Click - View Source in a popup window.
    	Shift+Right Click - Context menu.
    **/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    this.Cb = custombuttons;
    this.properties = {
    	en_US:{
    		Help: '**************************************************\n' 
    		+ 'To use:\n'
    		+ '	Left Click - Open sidebar with Bookmarks\n'
    		+ '	\n'
    		+ '	Mid Click - Open Addons Manager Dialog.\n'
    		+ '	\n'
    		+ '	Right Click - View Source in a popup window.\n'
    		+ '	\n',
    		zLast:'Last no Comma'
    	}
    };
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.leftclick   = function(evt){
    	toggleSidebar('viewBookmarksSidebar');
    }
    this.sleftclick  = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.aleftclick  = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.cleftclick  = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.midclick    = function(evt){
    	BrowserOpenAddonsMgr();
    }
    this.smidclick   = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.amidclick   = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.cmidclick   = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.rightclick  = function(evt){
    	BrowserViewSourceOfDocument(content.document);
    }
    this.arightclick = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.crightclick = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20071205.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bmarksaddonssource-needs-update.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    **************************************************
    To use:
    	Left Click - Open sidebar with Bookmarks
    	Mid Click - Open Addons Manager Dialog.
    	Right Click - View Source in a popup window.
    
  36. Back Is Close (CB)

    Code Tab

    /* 
    The intention of this button is to replace/replicate the functionality of the Back Is Close extension: 
    https://addons.mozilla.org/en-US/firefox/addon/939
    as the extension is incompatible with Firefox 3 at the time of writing.
    Essentially, it functions as a back button, unless the current tab has no history, in which case clicking the button closes the current tab. Further to this, if the window has no tabs, clicking the button can:
      - Do nothing
      - Close the window
      - Close the window if it is not the oldest window
      - Close the window if it is not the only window
    Which of these it does is defined by the user's preferences. These are set from the context menu, accessed by right clicking on the button.
    The images used by the button can also be replaced by modifying the BackImage, CloseImage and DisabledImage variables under the IMAGE PREFS section of the Inititialization code. Also the display of button icon when the button's action is disabled can be affected by modifying the DefaultDisabledImageBehaviour or "DeDIB" variable in the initialization tab. 
    It can be set to 0, 1 or 2 for the following behaviour:
      0 = Use the CloseImage and dim it
      1 = Use the DisabledImage and dim it
      2 = Use the DisabledImage but do not dim it
    Rawny ^^
    */

    Initialization Tab

    // ***** START OF USER PREFS ***** //
    /* 
    	DefaultDisabledImageBehaviour ("DeDIB") Key:
    		0 = Do not use the DisabledImage and instead dim the CloseImage when button action is disabled
    		1 = Use the DisabledImage and also dim it when button action is disabled
    		2 = Use the DisabledImage as it is when button action is disabled
    	The button icon reflects the button action as follows:
    		Button action is to go back one page     = Button icon is BackImage
    		Button action is to close the tab/window = Button icon is CloseImage 
      		Button action is disabled                = Depends on the users set preference
    */
    var DeDIB = 1;
    var BackImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAslJREFUOE9FkklMU1EYhZ8u3JlojIloInGImEhcSAwgomLCICFYGyViRFBAlKGEmQAVBVpAQBAZrAhEBClFIITJBplKgYKgIGKZ56lYWFCwpeW+Y591ODmbm/t991/8d4dqY436m6mp1dq6sY/Nc6PTmz/VZP+enWzno85OJqamB/4xlF7Qd121Gp9Qu88k9zRbwslYSK1Qp1RoAp6vmLl27zbJ8+cIFYpllWpNX2pDT68rPb2Ljc7V5NRp5Ap8m4dsFJ0jkI2jdRiJleSwbZu9k2B5aWnDICQm1RtZVtd+wbQSzYMolUDcj0oZCprwthVVPUirxyFbqZdPCSPI5ZN7j2elVW0NzkHUgRIJ+iagz8Qy0qqRXsP0VSM8c7DrWEFT0wCV+kx8itUuHWMeE4ghlTM0IbSoXRdVjNhSpvEicEUwvvb9IUdE2bOLPPiLZV2IFaJrmKF127SwTesnoIMLEVSAwHwE5CHkDSyCN8/YFlJHLF/7Zqs5+RC2M7Q+Wzp6SkHPKjH7A1MrGF1kJrhnwiqSHLQooU7YFN1J1zjwUCYlBoEQqLfoPyFEqyNx5bR5FEyDiPGlcsrOvZLNV17kw5xLxP3bemFTQ/MqtaxUrWum1iVD65yiPRtDm3FhFqmxdKmgknI7zgcO3S6EVSIuPyUfBhhHsQ6PApgnwDoJF5JhkwLHLJiHzvtyG6nB4ZmT7AbvEuJSCMccsF6SznHGaR3FlWxcFYAlwPV8uBXD5KakvkVO6XcR+0JmHTYUJsb9Kri+wz0REfXreE3kVinchPB6j1Ax7OOn70a3/N60am1VueLObbeLG3kioXkyhDfjQR38GxDZjPhO8DrBTp91CGiZmTd8DdWawYnO6rPkdHvm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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmKW1oAAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNTDus58AAAC5SURBVChTTY/JFoIwDEVTFJE6gGWqBbXIYFDM//9dTcWF97Q5L3eVB45BqxiLPgN/pdoX0yq1CL8+Ga+8OLV+W2hPDjCdJpvf7vdbbqcpRWjsMGT0vl7flA2DbSDpuq5BQn4NxwSOZVkW0Ug0RgXHIxx4xqEXYczxAPuqqjYzjSPNG457kLHWK3pstw9aaR1LwJ0xci3PZx7G7BBccPkj8KcHdd971/d1sJQTghWvQvzaOkwEk3zrfwCC4z7PyJlLuwAAAABJRU5ErkJggg==";
    var DisabledImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFiYmJjIyMjY2Njo6Oj4+PkpKSlJSUlZWVlpaWl5eXmpqanJycnZ2doaGhoqKipqamp6enqampqqqqr6+vsrKyuLi4ubm5u7u7vr6+wsLCxMTEyMjIzMzMzc3N29vb4+Pj////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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coAAAAASUVORK5CYII=";
    // ***** END OF USER PREFS ***** // 
    // ***** VARS ***** //
    de = createDebug(this);
    var Button = this;
    var WindowBehaviour = 0;
    var DisabledImageBehaviour = 0;
    // Sets prefstring to the location of this buttons preferences
    var prefstring = "custombuttons.BIC.preferences";
    this.ss = [
    	{ label: "Do not close the window, only ever close tabs", value: "0" },
    	{ label: "Close the window if it's not the oldest window", value: "1" },
    	{ label: "Close the window if it's not the only window", value: "2" },
    	{ label: "Close the window regardless", value: "3" }
    ]
    // ***** DETERMINES WHICH ITEM IS CHECKED IN THE CONTEXT MENU ***** //
    this.getIndex = function(aNode) {                    
    	try {
    	// Tries to pull out the preferences value
    		var prefs = custombuttons.getPrefs(prefstring);
    	} 
    	catch(ex) {
    	// If the above retrieval fails, the preference value is set to "0~"+DeBIB                                         
    		custombuttons.setPrefs(prefstring,"0~"+DeDIB);
    	}
    	var prefs = custombuttons.getPrefs(prefstring);
    	var sOne = prefs.indexOf("~");
    	var pOne = prefs.substr(0,sOne);
    	var pTwo = prefs.substr(sOne+1);                
    // Uncheck all the menu items
    	for(var i = 0; i < aNode.childNodes.length; i++) {              
    		aNode.childNodes[i].removeAttribute("checked");         
    	}
    // Check the menu item where it's index value corresponds to the preference value
    	aNode.childNodes[pOne].setAttribute("checked", true);
    }
    // ***** CHECKS AN ITEM IN THE CONTEXT MENU ***** //
    this.setIndex = function(aNode) {
        var prefs = custombuttons.getPrefs(prefstring);
    	var sOne = prefs.indexOf("~");
    	var pOne = prefs.substr(0,sOne);
    	var pTwo = prefs.substr(sOne+1);
    // Sets the preference value to the index value of the aNode passed into this function.
    // In other words, when a particular option is clicked and passed into this function, set the preference value accordingly.
    	custombuttons.setPrefs(prefstring, aNode.getAttribute("index")+"~"+pTwo);
    // Also check the menu item
    	aNode.checked = true;
    	ReloadIcon();
    }
    // ***** USED TO ADD THE ITEMS TO THE CONTEXT MENU ***** //
    function addMenuItem(aNode, aObject, aIndex, aLabel, aValue) {
    	var mi = aNode.appendChild(document.createElement("menuitem"));
    // Notice that the oncommand event (for the menu item created by this function) is set to call the setIndex function above.
    // The upshot of this is, when the menu item is clicked, the preference value is set to the menu item's index and the menu item becomes checked.
    	mi.setAttribute("oncommand", "document.popupNode.setIndex(this)");
    	mi.setAttribute("index", aIndex);
    	mi.setAttribute("label", aLabel);
    	mi.setAttribute("value", aValue);
    	mi.setAttribute("type", "checkbox");
    	mi.setAttribute("autoCheck", false);
    }
    // ***** MOVES THE CB² CONTEXT MENU INTO A SUBMENU BELOW A MENU SEPERATOR AT THE END OF THE EXISTING CONTEXT MENU ***** //
    function copyMenuItems(node, id, separate) {
    	var menupopup = document.getElementById(id).cloneNode(true);
    	var menuitems = menupopup.childNodes.length;
    	for(var i = 0; i < menuitems; i++)
    	node.appendChild(menupopup.firstChild);
    	if(separate)
    	node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
    	var m = aNode.appendChild(document.createElement("menu"));
    	m.setAttribute("label", "Custom Button");
    	var mp = m.appendChild(document.createElement("menupopup"));
    	copyMenuItems(mp, "custombuttons-contextpopup");
    	aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    // ***** ADDS THE MENU ITEMS TO THE CONTEXT MENU ***** //
    const popupID = "cbContext-BIC";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.getIndex(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    // For the array of menu items, add each one to the context menu using our addMenuItem function from earlier
    for(var i = 0; i < this.ss.length; i++) {
    	addMenuItem(pop, this, i, this.ss[i].label, this.ss[i].value);
    }
    // ***** SHOW POPUP FUNCTION ***** // 
    this.showPopup = function(node) {
      var popup = document.getElementById("cbContext-BIC");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height + 24;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
    	checkForMiddleClick(this, evt);
    	ProcessTab(evt);
    };
    this.aleftclick = function(evt) 
    {
    	checkForMiddleClick(this, evt);
    	ProcessTab(evt);
    };
    this.cleftclick = function(evt) 
    {
    	checkForMiddleClick(this, evt);
    	ProcessTab(evt);
    };
    this.sleftclick = function(evt) 
    {
    	checkForMiddleClick(this, evt);
    	ProcessTab(evt);
    };
    this.midclick = function(evt) 
    {
    	checkForMiddleClick(this, evt);
    	ProcessTab(evt);
    };
    this.smidclick = function(evt) 
    {
    	checkForMiddleClick(this, evt);
    	ProcessTab(evt);
    };
    this.rightclick = function(evt) 
    {
    	this.showPopup(this);
    };
    // ***** FUNCTIONS ***** //
    this.prefGet = function() {
    	var Prefs = custombuttons.getPrefs(prefstring);
    	var sOne = Prefs.indexOf("~");
    	var pOne = Prefs.substr(0,sOne);
    	var pTwo = Prefs.substr(sOne+1);
    	WindowBehaviour = pOne;
    	DisabledImageBehaviour = pTwo;
    };
    function GetOldestWindow()
    {
    // See my "determine oldest window demo" button for an explanation of this code: http://custombuttons2.com/forum/buttons-database/determine-oldest-window-demo-t1113.html
    	var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
            var enumerator = wm.getEnumerator("navigator:browser");
    	var win = enumerator.getNext();
    	return win;
    }
    function CountWindows()
    {
    // See my "count open windows demo" button for an explanation of this code: http://custombuttons2.com/forum/buttons-database/count-open-windows-demo-button-t1102.html
    	var count = 0;
    	var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
    	var enumerator = wm.getEnumerator("");
    	while(enumerator.hasMoreElements()) {
    		var win = enumerator.getNext();
    		count = count + 1;
    	}
    	return count;
    }
    function DisabledImagePrefReloadIcon()
    {
    	if (DisabledImageBehaviour == 0) {
    		Button.image = CloseImage;
    		Button.style.opacity = '.50';
    	}
    	else {
    		if (DisabledImageBehaviour == 1) {
    			Button.style.opacity = '.50';
    		}
    		Button.image = DisabledImage;
    	}
    	Button.tooltipText = "Disabled";
    }
    function WinPrefReloadIcon()
    {
    	if (WindowBehaviour == 1) {
    	// WindowBehaviour 1 = Close the window if it's not the oldest window
    		if (GetOldestWindow() != window) {
    			Button.image = CloseImage;
    			Button.tooltipText = "Close window";
    		}
    		else {
    			DisabledImagePrefReloadIcon();
    		}	
     	}
    	else {
    		if (WindowBehaviour == 2) {
     		// WindowBehaviour 2 = Close the window if it's not the only window
     			if (CountWindows() != 1) {
    		 		Button.image = CloseImage;
    		 		Button.tooltipText = "Close window";
    			}
    			else
    			{
    				DisabledImagePrefReloadIcon();
    			}
     		}
     		else {
     			if (WindowBehaviour == 3) {
     			// WindowBehaviour 3 = Close the window regardless
    		 		Button.image = CloseImage;
    		 		Button.tooltipText = "Close window";
    		 	}
    		 	else {
    		 		DisabledImagePrefReloadIcon();
    		 	}
     		}
    	}
    }
    function ReloadIcon()
    {
    	Button.style.opacity = '1';
    	var rLen = 0;
    	Button.prefGet();
    	try {
    		rLen = gBrowser.contentWindow.history.previous.length;
    	}
    	catch(error) {}
    	if (rLen > 0) {
    		Button.image = BackImage;
    		Button.tooltipText = "Go back one page";
    	}
    	else {
    		var rTabURL = gBrowser.selectedBrowser.contentDocument.location.href;
    		if ((!(rTabURL == "about:blank")) || (gBrowser.mTabs.length > 1)) {
    			Button.image = CloseImage;
    			Button.tooltipText = "Close tab";
    		}
    		else {
    			WinPrefReloadIcon();
    		}
    	}
    }
    function ProcessWindow()
    {
    	if (WindowBehaviour == 1) {
    		// If the window is not the oldest window, close it
    		if (GetOldestWindow() != window) {
    			BrowserTryToCloseWindow();
    		}
    		else {
    			// Do nothing
    		}	
     	}
    	else {
    		if (WindowBehaviour == 2) {
    			// If the window is not the only window, close it
    			if (CountWindows() != 1) {
    				BrowserTryToCloseWindow();
    			}
    			else {
    				// Do nothing
    			}
     		}
     		else {
    			if (WindowBehaviour == 3) {
    		 		// Close the window regardless
    		 		BrowserTryToCloseWindow();
    		 	}
    		 	else {
    		 		// Do nothing
    		 	}
     		}
    	}
    }
    function ProcessTab(evt)
    {
    	var tLen = 0;
    	Button.prefGet(); 
    	try {
    		tLen = gBrowser.contentWindow.history.previous.length;
    	}
    	catch(error) {}
    	if (tLen > 0) {
    		BrowserBack(evt);
    	}
    	else {
    		var tTabURL = gBrowser.selectedBrowser.contentDocument.location.href;
    		if ((!(tTabURL == "about:blank")) || (gBrowser.mTabs.length > 1)) {
    			gBrowser.removeCurrentTab();
    		}
    		else {
    			ProcessWindow();
    		}
    	}
    }
    function Closed(event)
    {
    	// Remove event listener
    	window.removeEventListener("focus", ReloadIcon, true);
    }
    // ***** INITIALISATION ***** //
    // Move the CB² context menu into the submenu and set our menu as the context menu
    cloneCBContext(pop);
    this.setAttribute("context", popupID);
    var check = custombuttons.isPref(prefstring);
    if (!check) {
    		custombuttons.setPrefs(prefstring,"0~"+DeDIB);
    }
    else {
    		this.prefGet();
    }
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    window.addEventListener("focus", ReloadIcon, true);
    window.onclose = Closed;
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, Others');
    this.setAttribute('version','8.8.9');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/back-close-cb.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, CB2 2.0.*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    The intention of this button is to replace/replicate the functionality of the Back Is Close extension: 
    https://addons.mozilla.org/en-US/firefox/addon/939
    as the extension is incompatible with Firefox 3 at the time of writing.
    Essentially, it functions as a back button, unless the current tab has no history, in which case clicking the button closes the current tab. Further to this, if the window has no tabs, clicking the button can:
      - Do nothing
      - Close the window
      - Close the window if it is not the oldest window
      - Close the window if it is not the only window
    Which of these it does is defined by the user's preferences. These are set from the context menu, accessed by right clicking on the button.
    The images used by the button can also be replaced by modifying the BackImage, CloseImage and DisabledImage variables under the IMAGE PREFS section of the Inititialization code. Also the display of button icon when the button's action is disabled can be affected by modifying the DefaultDisabledImageBehaviour or "DeDIB" variable in the initialization tab. 
    It can be set to 0, 1 or 2 for the following behaviour:
      0 = Use the CloseImage and dim it
      1 = Use the DisabledImage and dim it
      2 = Use the DisabledImage but do not dim it
    Rawny ^^
  37. bbcode Color Picker Menu

    Code Tab

    this.siteGo(event);
    

    Initialization Tab

    var limit=10;
    var mPop;
    var img=this.image;
    var apps=new Array;
    var bkimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAjSURBVChTY2RgYPgPxCQDkCZSMckawC4j1ZZRTUiBNuxCDwDYNZxl4jAoIwAAAABJRU5ErkJggg=='; 
    var gimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAjSURBVChTY2xoaPjPQCoAaSIVM5CqAeyyUU2QkB4NCGiSAwARDYf0VrC2pAAAAABJRU5ErkJggg=='; 
    var dbimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAiSURBVChTY2RgaPjPQDoAaSIVk6wB7DJSbRnVhBQ1wy/0APHz6uW3kCqQAAAAAElFTkSuQmCC'; 
    var mbimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAjSURBVChTY2Rg+P+fgXQA0kQqJlkD2GWk2jKqCSlqhl/oAQBHiTjXkScs1gAAAABJRU5ErkJggg=='; 
    var lbimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAjSURBVChTY2Ro+P+fgWQA0kQqJlkD2GWk2jKqCSlqhmHoAQCvx4dXOyeIIwAAAABJRU5ErkJggg=='; 
    var rimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAhSURBVChTY/zPwABEJAKQJlIxyJpRTaDQHg0ISEIgKyAAgF4417koG3YAAAAASUVORK5CYII='; 
    var dgimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAiSURBVChTY2RwcPjPQDIAaSIVk6wB7DJSbRnVhBQ1wzD0ABlC6uWFotxVAAAAAElFTkSuQmCC'; 
    var mgimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAiSURBVChTY2RoYPjPQDIAaSIVk6wB7DJSbRnVhBQ1wzD0AECC6uVsWqU7AAAAAElFTkSuQmCC'; 
    var lgimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAhSURBVChTY2T4D4QkA5AmUiHJGsAuI9WWUU1IQTYMQw8A4+w41+ZsTRMAAAAASUVORK5CYII='; 
    var yimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAiSURBVChTY/z/n+E/A6kApIlUDNQxqgkc2qMBAUkIZAUEAIwV1Tp+Fd+aAAAAAElFTkSuQmCC'; 
    var brimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAjSURBVChTY2xwYPjPQCoAaSIVM5CqAeyyUU2QkB4NCGiSAwDDIRI03d8RRAAAAABJRU5ErkJggg=='; 
    var oimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAjSURBVChTY/zf4PCfgVQA0kQqZiBVA9hlo5ogIT0aENAkBwD1e66X4yzbFwAAAABJRU5ErkJggg=='; 
    var pimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAjSURBVChTY/zP8P8/A6kApIlUzECqBrDLRjVBQno0IKBJDgDvo9U6ZXukigAAAABJRU5ErkJggg=='; 
    var wimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABGdBTUEAALGPC/xhBQAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAhSURBVChTY/wPBAykApAmUgEDqRrALhvVBAmB0YCApgQA+1pxrOcOFPgAAAAASUVORK5CYII='; 
    apps.push(['Black','[color=#000000] [/color]',bkimg]);
    apps.push(['Gray','[color=#555555] [/color]',gimg]);
    apps.push(['D-Blue','[color=#000066] [/color]',dbimg]);
    apps.push(['M-Blue','[color=#3366ff] [/color]',mbimg]);
    apps.push(['L-Blue','[color=#33ccff] [/color]',lbimg]);
    apps.push(['Red','[color=#ff0000] [/color]',rimg]);
    apps.push(['D-Green','[color=#006600] [/color]',dgimg]);
    apps.push(['M-Green','[color=#33cc00] [/color]',mgimg]);
    apps.push(['L-Green','[color=#99FF99] [/color]',lgimg]);
    apps.push(['Yellow','[color=#ffff00] [/color]',yimg]);
    apps.push(['Brown','[color=#663300] [/color]',brimg]);
    apps.push(['Orange','[color=#ff9900] [/color]',oimg]);
    apps.push(['Pink','[color=#ffcc00] [/color]',pimg]);
    apps.push(['White','[color=#ffffff] [/color]',wimg]);
    /* Spares
    apps.push(['separator']);
    apps.push(['separator']);
    apps.push(['','',img]);
    apps.push(['','',img]);
    apps.push(['','',img]);
    var img='';
    var img='';
    var img='';
     */
    nItem=function(label,value,name,img){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      mItem.value = value;
      mItem.tooltipText = label;
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',img);
      mItem.setAttribute('name',name);
      return mItem;
    }
    mPop=document.createElement('menupopup');
    	for (var i=0;i<apps.length;i++){
    	 if (apps[i] =='separator'){
    		  mPop.appendChild(document.createElement('menuseparator'));
    	 }else{
    		  mPop.appendChild(nItem(apps[i] [0],apps[i] [1],'Permanent',apps[i] [2]));
    	 }
    	}
    this.siteGo=function(evt)
    {
    	var site=evt.target.value;
    	this.pasteItem(site);
    }
    this.pasteItem= function(value) {
    var theBox = document.commandDispatcher.focusedElement;
    var startPos = theBox.selectionStart;
    var endPos = theBox.selectionEnd;
    var oPosition = theBox.scrollTop;
    var oHeight = theBox.scrollHeight;
    var text=theBox.value.substring(0,startPos);
    var nHeight = theBox.scrollHeight - oHeight;
    var str = value;
    text +=str;
    text +=theBox.value.substring(endPos, theBox.value.length);
    theBox.value = text;
    theBox.selectionStart = startPos + str.length;
    theBox.selectionEnd = startPos + str.length;
    theBox.scrollTop = oPosition + nHeight;
    }
    this.appendChild(mPop);
    this.type = "menu";
    this.setAttribute("class", "menu-iconic");
    this.value=-1;
    /*---------------------- Show Focus Block Start ------------------------*/
    /* ---- un-comment if desired ----
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25,m435tr0d/nicholas');
    this.setAttribute('version','20070913.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-color-picker-menu.html');
    this.setAttribute('dependency','');
    this.setAttribute('status','complete');
    this.setAttribute('public',true);
    this.setAttribute('help','0,Left-click opens color chooser \n\n note: the cursor must be in a text box');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    /*Help*/
        This button is adapted from the "Clippings Menu" button
          created by:  m435tr0d(nicholas)  
        Selecting a color from the menu will paste the text-color 
          bbcode in a text-area.  Insert the desired text between the brackets.
          example [color=#000000]text goes here[/color]     
          note: The cursor must be in a text field.
  38. BBCode Menu

    Code Tab

    /*CODE*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    var menuName="context-bbcode";
    var menu=document.createElement('menupopup');
    var subMenu=document.getElementById(menuName);
    subMenu=subMenu.getElementsByTagName('menupopup')[0];
    for (var i=0;i<subMenu.childNodes.length;i++)
    {
    	subMenu.childNodes[i].hidden=false;
    	var sMenu=subMenu.childNodes[i].cloneNode(true);
    	menu.appendChild(sMenu);
    }		
    this.setAttribute("class", "menu-iconic");
    this.appendChild(menu);
    this.type = 'menu';
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','20060825.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-menu-button.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

  39. big screen

    Code Tab

    /*gBrowser.setStripVisibilityTo(false);
    var bars = document.getElementsByTagName("toolbar");
    var menuBar=document.getElementById("toolbar-menubar");
    for(var i=0;i<bars.length;i++){
      if(bars[i]!=menuBar && bars[i].getAttribute("class").indexOf("chromeclass") != -1){
        bars[i].collapsed=true;
      }
    }*/
    window.maximize();
    window.maximize();
    //BrowserFullScreen();

    Initialization Tab

    this.setAttribute("accesskey", "B");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','Jessef');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/big-screen.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

  40. Blank Links Button

    Code Tab

    this.value="url to be opened on click";
    gBrowser.selectedTab = gBrowser.addTab(event.target.value);

    Initialization Tab

    var apps,srcUrl,MItem,mPop;
    //------menu items--------
    apps=new Array;
    apps.push(['Item Name','Item Url']); 
    //------/menu items-------
    MItem=function(label,path){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      mItem.id = path;
      mItem.value = path;
      mItem.tooltipText = path;
      return mItem;
    }
      this.tooltipText = "Tooltip Text";
    //this.orient="vertical";
    mPop=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mPop.appendChild(document.createElement('menuseparator'));
     }else{
      if (!apps[i] [2]) apps[i] [2]=srcUrl;
      mPop.appendChild(MItem(apps[i] [0],apps[i] [1]));
     }
    }
    this.appendChild(mPop);
    this.type = "menu-button";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/link-menus.html');

    Help Tab

  41. Blogline Login

    Code Tab

    /*CODE*/
    this.loadWprefs('http://www.bloglines.com/login');
    

    Initialization Tab

    /*Initialization Code*/
    this.loadWprefs = function(sUrl) {
      var openInTab, loadInBackground;
      try {
        openInwin = custombuttons.getPrefs( 'browser.link.open_newwindow' );
        loadInBackground = custombuttons.getPrefs( 'browser.tabs.loadInBackground' )
      } catch(ex) {
      }
      var query = gURLBar.value;
      var url = sUrl;
      handleURLBarRevert(); //reset the URL bar
      if( openInwin == 'undefined' || openInwin == 3  ) {
        var newTab = gBrowser.addTab(url);
        if(!loadInBackground) gBrowser.selectedTab = newTab;
      } else
        openUILink(url, aEvent, false, true);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.style.opacity = '.99';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    this.setAttribute("author", "SCClockDr, LouCypher" );
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.setAttribute("dependency","FF 2.*,CB 2.0.02b");
    this.setAttribute("version","20070528.00");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bloglines-login-scclockdr.html');
    this.setAttribute("update","");
    this.setAttribute("help","0,Help has not been defined for this button.");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bloglines-login-scclockdr.html');

    Help Tab

    Help has not been defined for this button.
  42. Bold²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [b'+']Clipboard\n\nHTML: <b'+'>Clipboard</'+'b>';
    this.ss = [
      { label: 'BBCode', open: '[b'+']', open1: '[b'+']%h', close: '[/b'+']', sItemId: '' },
      { label: 'HTML'  , open: '<b'+'>', open1: '<b'+'>%h', close: '</b'+'>', sItemId: '' },
      { label: 'WIKI'  , open: '*'+'*' , open1: '*'+'*%h' , close: '*'+'*'  , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function(oBtn){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          x.text += x.listo;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked=true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.cBoard) {
        alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
        return;
      }
      x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
      var nLen = x.n.length;
      x.text += x.n;
      x.theBox.value = x.text + x.eBlock;
      x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*,  CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *********************************************************************************************	
     L = IF text is highlighted:
    	 BBCode: [b]Highlighted[/b]
    	 HTML: <b>Highlighted</b>	
    	 WIKI: **Highlighted**	
    	 OR nothing highlighted
    		 First click = [b], <b>, or **
    		 Second click = [/b], </b>, or **	
     M =
    	 BBCode: [b]Clipboard[/b]
    	 HTML: <b>Clipboard</b>	
    	 WIKI: **Clipboard**
     R = Context Menu with tag options and submenu for CB Context
  43. Bookmark All

    Code Tab

    /*
    Left click         = Open a dialogue so you can select which tabs you want to button-bookmark/store the URLs for
    Shift+Left click   = Button-bookmark/store the URLs for ALL tabs
    Alt+Left click     = Clear the list of button-bookmarks/stored URLs
    Middle click       = Open the button-bookmarks/stored URLs in new tabs
    Shift+Middle click = Open the button-bookmarks/stored URLs in a new window
    Right click        = Open the context menu of button-bookmarks
    Rawny ^^
    */
    

    Initialization Tab

    // ***** START OF USER PREFS ***** //
    /*
            this.TooltipPref: changes what is shown in the tooltip for tabs in the button-bookmarks list:
                    0 = The tab's URL
                    1 = The tab's title and URL
                    2 = The tab's title
            BeginSelected controls the state of the checkboxes in the dialogue opened on left click.
                    true = the checkboxes for the tabs will all be checked to start with
                    false = the checkboxes for the tabs will all be unchecked to start with
    */
    this.TooltipPref = 0;
    BeginSelected = false;
    // ***** END OF USER PREFS ***** // 
    // ***** IMAGES/ICONS ***** //
    var defaultfavicon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAANFmTWW+aanGPcXKgcXKicXKjd3ijeXmieXqhe3une36ifX6oeIejfYCicZfSb733gISkgoemhIethIupio+yh5CsipOukpi2kZu2maG9nLbgoKnCp7PLq8/5qdf/r9L5r9f/r9j/rd7/ssfisMnutdX5sNr/st7/tNr/tNz/utTxvtTxuNb5ut3/vdn5ueD/vOP/wtv6xdz6yt/6wOD/weP/weX/xOL/xuT/yuX/zeb/yOn/zej/zOv/0eDx0e3/1er/1e//3ufz2+7/3u7/5+v14PH+4PX/5PP+5fL/6fX/6vb+7vj+7/j/8Pf/8Pj/9Pv+9fr/+f3++fz//v//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1CwbVwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAClSURBVChTTcrVAoJAEEZhLGzXbsUuFLExUFExwFbe/1FWdpYL/7vzzTA4WMhn04lYwOfAZAzOGHSoZqeQgvy+0T5sA0jSfqLjJscSiNPWkTmAKOm7rnV5vg4QMfuha6qqyGOAkAF9UJbyCMD/Mf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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAq5unjwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAADBSURBVChTJY/RcoMwDATdmECaQNxikGWh1hDZ//+Jimjv7VYzmlunigksU5wgoaqzxqUwERDDlNRFq4WZMhDlHFcH1uyeAaiIxNlBFSrlJdUicl1dKsK1tbaHsOPmk0MSltZ+7+MwBPLoEIS51Z9ax48v6NCpAWrng/0osdM/AHUf77sgX1cDiRnk+/OG4UHehilmA2MYhseWPRpQYBsvR9mo7/6BrT6OLT/9JZmc2S79M/b+0i0mewLzn+cl4VlV34r9NZVbcMQFAAAAAElFTkSuQmCC";
    var imgTabs = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFAAAAU1JSb3Bxpm4TnXBSlnqMn4xxrq9P7JIP5Y8s9K8N77Aw3ZNP369v57BR+M8M89Aw+fQJ+vNP+fFxi4qKmZiXkZSvpKeTqKirt7i4nKnLsNXP3bGQ1Lax4s+x+vSRxMLF2djX6e/U5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxumegAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACbSURBVChThY1LEoMgDEABtbUooBAVWi2xcv8rWuLooqu+mZDwJh+2ZwKqWmGgcmc5ZqmVVFqqUyyyl53t8jufHUtj4yc6vVwju5IuOfm+dgRt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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE4OsNgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACSSURBVChTlY3dEoIgEEZJ/MNESAJELSIKS97/+YhmGqnLvoudnW/OngUdxm1b11VV5HmW7QLAlBLcIoTKEkKYBUBu1hpKSASbpikCMP47+s9iXf3vyTD4Ljmeg+PcHc/bF6HENMWxFU7MyzKLRHjJvVeH5HDjh+ge1tqruTDFxpFFh9Z6/85J9kL08g5CipRxfwGn7DMTaPc9DgAAAABJRU5ErkJggg==";
    // ***** VARS ***** //
    var button = this;
    var buttonID = this.getAttribute("id");
    var prefstring = "custombuttons.BA."+buttonID+".preferences";
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    this.BookmarksList = new Array();
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                       .getService(Components.interfaces.nsIWindowMediator);
    var TabArr = new Array();
    var tab = "";
    var title = "";
    var url = "";
    var img = "";
    var l = 0;
    // ***** USED TO ADD THE ITEMS TO THE CONTEXT MENU ***** //
    function addMenuItem(aNode, aObject, aIndex, aLabel, aURL, aImage) {
    	var mi = aNode.appendChild(document.createElement("menuitem"));        
    	var commandstring = "gBrowser.selectedTab = openUILink('"+aURL+"', event, false, true);";
    	mi.setAttribute("oncommand", commandstring);
    	mi.setAttribute("onclick", "checkForMiddleClick(this, event)");
    	mi.setAttribute("index", aIndex);
    	mi.setAttribute("label", aLabel);
    	mi.setAttribute("url", aURL);
    	mi.setAttribute("type", "menuitem-iconic bookmark-item");
    	mi.setAttribute("image", aImage);
    	if (button.TooltipPref == 0) {
    		mi.tooltipText = aURL;
    	}
    	else {
    		if (button.TooltipPref == 1) {
    			mi.tooltipText = aLabel+" - "+aURL;
    		}
    		else {
    			mi.tooltipText = aLabel;
    		}
    	}
    }
    // ***** ADDS THE MENU ITEMS TO THE CONTEXT MENU ***** //
    const popupID = "cbContext-BA-"+buttonID;
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.populateMenu(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    // ***** POPULATES THE CONTEXT MENU WITH THE BOOKMARKS ***** //
    this.populateMenu = function(aNode) {
    	while (aNode.hasChildNodes())
    		aNode.removeChild(aNode.firstChild);
    	button.BookmarksList = new Array();
    	GetBookmarks();
    	var l = button.BookmarksList.length;
    	var firstURL = button.BookmarksList[0][1];
    	if (firstURL == "") {
    		aNode.appendChild(document.createElement("menuitem"));
    		aNode.firstChild.setAttribute("label", "No button bookmarks");
    		aNode.firstChild.setAttribute("disabled", "true");
    		return;
    	}
    	else {
    		for(var i = 0; i < l; i++) {
    			var cTitle = button.BookmarksList[i][0];
    			var cURL = button.BookmarksList[i][1];
    			var cImage = button.BookmarksList[i][2];
    			addMenuItem(pop, this, i, cTitle, cURL, cImage);
    		}
    	}
    	aNode.appendChild(document.createElement("menuseparator"));
    	var mItemA = aNode.appendChild(document.createElement("menuitem"));
    	mItemA.setAttribute("oncommand", "OpenAllInTabs();");
    	mItemA.setAttribute("label", "Open all in tabs");
    	mItemA.setAttribute("image", imgTabs);
    	var mItemB = aNode.appendChild(document.createElement("menuitem"));
    	mItemB.setAttribute("oncommand", "OpenAllInWin();");
    	mItemB.setAttribute("label", "Open all in new window");
    	mItemB.setAttribute("image", imgWin);
    	var mItemC = aNode.appendChild(document.createElement("menuitem"));
    	mItemC.setAttribute("oncommand", "ClearBookmarks();");
    	mItemC.setAttribute("label", "Clear button bookmarks");
    	mItemC.setAttribute("image", imgClear);
    }
    // ***** SHOW POPUP FUNCTION ***** // 
    this.showPopup = function(node) {
    	var popup = document.getElementById("cbContext-BA-"+buttonID);
    	var x = node.boxObject.x;
    	var y = node.boxObject.y + node.boxObject.height + 24;
    	document.popupNode = node;
    	popup.showPopup(node, x, y, "popup", null, null);
    }
    // ***** FUNCTIONS ***** //
    function PrepArr() {
      var CleanArr = new Array();
      var l = TabArr.length;
      for (var i = 0; i < l; i++) {
        CleanArr[CleanArr.length] = [];
        var label = TabArr[i][0];
        CleanArr[i] = [label, TabArr[i][3], TabArr[i][2]];
      }
      CleanArr[CleanArr.length] = ["Button-bookmark all tabs", false, "All"];
      return CleanArr;
    }
    function GetTabArray() {
    	TabArr = new Array();
            var allLinks = "";
            var thisLink = "";
    	tab = "";
    	title = "";
    	url = "";
    	img = "";
    	l = gBrowser.browsers.length;
    	var browserEnumerator = wm.getEnumerator("navigator:browser");
    	var browserWin = browserEnumerator.getNext();
    	var tabbrowser = browserWin.getBrowser();
    	for (var i = 0; i < l; i++) {
    		title = gBrowser.getBrowserAtIndex(i).webNavigation.document.title;
    		url = gBrowser.getBrowserAtIndex(i).webNavigation.currentURI.spec;
    		if (url == "about:blank") {
    	    	    title = "(Untitled blank tab)";
                        img = defaultfavicon;
    		}
    		else {
                        img = tabbrowser.mTabs[i].image || defaultfavicon;
                        if (url.match("maps.google")) {
                          allLinks = gBrowser.getBrowserAtIndex(i).contentDocument.getElementsByTagName('a');
                          for(var j=0; j < allLinks.length; j++) {
                              thisLink = allLinks[j];
                              if (thisLink.innerHTML.match( /Link/)) {
                                  url = thisLink;
                              }
                          }
                        }
    		}
    		TabArr[i] = [title, url, i, BeginSelected, img];
    	}
    }
    function GetBookmarks() {
    	var splitting = new Array();
            var prefs = "";
    	try {
    		prefs = custombuttons.getPrefs(prefstring);
    	} 
    	catch(ex) {                                      
    		Msg.aMsg("No bookmarked tabs, left click the button to bookmark all tabs to the button.");
    		return;
    	}
    	splitting = prefs.split("#|#");
    	for (var i = 0; i < splitting.length; i++) {
    		var TabStr = "";
    		var j = 0;
    		var k = 0;
    		var l = 0;
    		TabStr = splitting[i];
    		l = TabStr.length;
    		j = TabStr.indexOf('#~#');
    		var TabTitle = TabStr.substring(0,j);
    		j = j + 3;
    		TabStr = TabStr.substring(j,l)
    		k = TabStr.indexOf('#~#');
    		var TabURL = TabStr.substring(0,k);
    		k = k + 3;
    		var TabImage = TabStr.substring(k,l);
    		button.BookmarksList[i] = [TabTitle, TabURL, TabImage];
            }
    }
    ClearBookmarks = function() {
        custombuttons.setPrefs(prefstring,"");
        button.BookmarksList = new Array();
    };
    BookmarkAll = function() {
        ClearBookmarks();
        GetTabArray();
        tab = "";
        title = "";
        url = "";
        img = "";
        var tL = TabArr.length;
        for (var m = 0; m < tL; m++) {
            if(m > 0) {
                tab += "#|#";
            }
            title = TabArr[m][0];
            url = TabArr[m][1];
            if (url == "about:blank") {
                title = "(Untitled blank tab)";
                img = defaultfavicon;
            }
            else {
                img = TabArr[m][4] || defaultfavicon;
            }
            tab += title + "#~#" + url + "#~#" + img;
    	} 
    	custombuttons.setPrefs(prefstring,tab);
    };
    OpenAllInTabs = function() {
            GetBookmarks();
            var mFirstURL = button.BookmarksList[0][1];
            if (mFirstURL != "") {
                for (var i = 0; i < button.BookmarksList.length; i++)
                {
            	    if (i == 0) {
            		    gBrowser.selectedTab = gBrowser.addTab(button.BookmarksList[i][1]);
            	    }
            	    else {
            		    gBrowser.addTab(button.BookmarksList[i][1]);
            	    }
                }
            }
    };
    OpenAllInWin = function() {
            GetBookmarks();
            var mFirstURL = button.BookmarksList[0][1];
            if (mFirstURL != "") {
    	    window.open();
                var NewWin = wm.getMostRecentWindow ("navigator:browser");
                var cBrowser = NewWin.gBrowser;
                for (var i = 0; i < button.BookmarksList.length; i++)
                {
            	    if (i == 0) {
            		    cBrowser.selectedTab = cBrowser.addTab(button.BookmarksList[i][1]);
            	    }
            	    else {
            		    cBrowser.addTab(button.BookmarksList[i][1]);
            	    }
                }
                cBrowser.mTabContainer.advanceSelectedTab(-1, true);
                cBrowser.removeCurrentTab();
            }
    };
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) {
    	GetTabArray();
            var ChkBxArr = new Array();
            ChkBxArr = PrepArr();
    	var SaveAll = false;
            var ChkBxDia = custombuttons.checkboxDialog(this,ChkBxArr,"Bookmark All","Please select the tabs you would like to bookmark:",null,null,"Bookmark","Cancel",null,null,null,null);
    	if (ChkBxDia) {
    		var pL = ChkBxArr.length;
    		var aL = TabArr.length;
    		for (var q = 0; q < pL; q++) {
    			if (ChkBxArr[q][2] == "All" && ChkBxArr[q][1]) {
    				SaveAll = true;
    			}
    		}
    		for (var k = 0; k < aL; k++) {
    			TabArr[k][3] = SaveAll;
    		}
    		if (SaveAll == false) {			
    			for (var j = 0; j < pL; j++) {
    				for (var n = 0; n < aL; n++) {
    		  			if (TabArr[n][2] == ChkBxArr[j][2] && ChkBxArr[j][1]) {
    		    			    TabArr[n][3] = true;
    		  			}
    				}
    			}
    		}
    		ClearBookmarks();
    		title = "";
    		url = "";
    		img = "";
    		var lowest = 0;
    		var found = false;
    		while (found == false) {
    			if (TabArr[lowest][3] == true) {
    				found = true;
    			}
    			else {
    				lowest = lowest + 1;
    			}
    		}
    		for (var m = 0; m < aL; m++) {
    			if (TabArr[m][3] == true) {
    				if(m > lowest) {
    					tab += "#|#";
    				}
    				title = TabArr[m][0];
    				url = TabArr[m][1];
    				if (url == "about:blank") {
    					title = "(Untitled blank tab)";
    					img = defaultfavicon;
    				}
    				else {
    					img = TabArr[m][4] || defaultfavicon;
    				}
    				tab += title + "#~#" + url + "#~#" + img;
    			}
    		}
    	}    	 
            custombuttons.setPrefs(prefstring,tab);  
    }
    this.sleftclick = function(evt) {
            BookmarkAll();
    };
    this.midclick = function(evt) {
            OpenAllInTabs();
    };
    this.smidclick = function(evt) {
            OpenAllInWin();
    };
    this.rightclick = function(evt) {
    	// Open button's bookmark context menu (allowing opening of individual items from the list).
    	this.showPopup(this);
    };
    this.aleftclick = function(evt) {
    	ClearBookmarks();
    };
    // ***** INITIALISATION ***** //
    this.tooltipText = "" +
      "Bookmark All:                                                                                   \n"+
      "  L:\t\t\tOpen prompt to choose tabs to button-bookmark\n"+
      "  Alt+L:\t\tClears button-bookmarks\n"+
      "  Shift+L:\t\tButton-bookmark all tabs\n"+
      "  M:\t\t\tOpen the button-bookmarks in new tabs\n"+
      "  Shift+M:\tOpen the button-bookmarks in a new window\n"+
      "  R:\t\t\tOpen the context menu of button-bookmarks";
    this.setAttribute("context", popupID);
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','11.1 (2009-03-09)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-all-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-all-button.html');

    Help Tab

    Shift+Left click   = Button-bookmark all tabs
    Alt+Left click     = Clears button-bookmarks
    Left click             = Open prompt to choose tabs to button-bookmark
    Middle click         = Open the button-bookmarks in new tabs
    Shift+Middle click = Open the button-bookmarks/stored URLs in a new window
    Right click           = Open the context menu of button-bookmarks
  44. Bookmark All

    Code Tab

    /*
    Left click         = Open a dialogue so you can select which tabs you want to button-bookmark/store the URLs for
    Shift+Left click   = Button-bookmark/store the URLs for ALL tabs
    Alt+Left click     = Clear the list of button-bookmarks/stored URLs
    Middle click       = Open the button-bookmarks/stored URLs in new tabs
    Shift+Middle click = Open the button-bookmarks/stored URLs in a new window
    Right click        = Open the context menu of button-bookmarks
    Rawny ^^
    */
    

    Initialization Tab

    // ***** START OF USER PREFS ***** //
    /*
            this.TooltipPref: changes what is shown in the tooltip for tabs in the button-bookmarks list:
                    0 = The tab's URL
                    1 = The tab's title and URL
                    2 = The tab's title
            BeginSelected controls the state of the checkboxes in the dialogue opened on left click.
                    true = the checkboxes for the tabs will all be checked to start with
                    false = the checkboxes for the tabs will all be unchecked to start with
    */
    this.TooltipPref = 0;
    BeginSelected = false;
    // ***** END OF USER PREFS ***** // 
    // ***** IMAGES/ICONS ***** //
    var defaultfavicon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAANFmTWW+aanGPcXKgcXKicXKjd3ijeXmieXqhe3une36ifX6oeIejfYCicZfSb733gISkgoemhIethIupio+yh5CsipOukpi2kZu2maG9nLbgoKnCp7PLq8/5qdf/r9L5r9f/r9j/rd7/ssfisMnutdX5sNr/st7/tNr/tNz/utTxvtTxuNb5ut3/vdn5ueD/vOP/wtv6xdz6yt/6wOD/weP/weX/xOL/xuT/yuX/zeb/yOn/zej/zOv/0eDx0e3/1er/1e//3ufz2+7/3u7/5+v14PH+4PX/5PP+5fL/6fX/6vb+7vj+7/j/8Pf/8Pj/9Pv+9fr/+f3++fz//v//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1CwbVwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAClSURBVChTTcrVAoJAEEZhLGzXbsUuFLExUFExwFbe/1FWdpYL/7vzzTA4WMhn04lYwOfAZAzOGHSoZqeQgvy+0T5sA0jSfqLjJscSiNPWkTmAKOm7rnV5vg4QMfuha6qqyGOAkAF9UJbyCMD/Mf9JL+ZDAO/Lamnap3Cjd2ki9gA8V6uFTgPAfaF3od0sAThPVle4IoDrvNuuV7OB2KqWAdj/YfwDqt9c7FiRL6kAAAAASUVORK5CYII=";
    var imgClear = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAA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AAAAAAAAAAAAAAAAAAAAAAAq5unjwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAADBSURBVChTJY/RcoMwDATdmECaQNxikGWh1hDZ//+Jimjv7VYzmlunigksU5wgoaqzxqUwERDDlNRFq4WZMhDlHFcH1uyeAaiIxNlBFSrlJdUicl1dKsK1tbaHsOPmk0MSltZ+7+MwBPLoEIS51Z9ax48v6NCpAWrng/0osdM/AHUf77sgX1cDiRnk+/OG4UHehilmA2MYhseWPRpQYBsvR9mo7/6BrT6OLT/9JZmc2S79M/b+0i0mewLzn+cl4VlV34r9NZVbcMQFAAAAAElFTkSuQmCC";
    var imgTabs = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFAAAAU1JSb3Bxpm4TnXBSlnqMn4xxrq9P7JIP5Y8s9K8N77Aw3ZNP369v57BR+M8M89Aw+fQJ+vNP+fFxi4qKmZiXkZSvpKeTqKirt7i4nKnLsNXP3bGQ1Lax4s+x+vSRxMLF2djX6e/U5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxumegAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACbSURBVChThY1LEoMgDEABtbUooBAVWi2xcv8rWuLooqu+mZDwJh+2ZwKqWmGgcmc5ZqmVVFqqUyyyl53t8jufHUtj4yc6vVwju5IuOfm+dgRtrIvOmqOFlrb9ozVNY+50JwuAorzV81QAQBYBgvdj2U7j03uAwJCnDAyAOa0cWfUigWKglLxgPG0EiEoQnK3Hf1vDASKd/eG/+AIc9XB759IalAAAAABJRU5ErkJggg==";
    var imgWin = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAe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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE4OsNgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACSSURBVChTlY3dEoIgEEZJ/MNESAJELSIKS97/+YhmGqnLvoudnW/OngUdxm1b11VV5HmW7QLAlBLcIoTKEkKYBUBu1hpKSASbpikCMP47+s9iXf3vyTD4Ljmeg+PcHc/bF6HENMWxFU7MyzKLRHjJvVeH5HDjh+ge1tqruTDFxpFFh9Z6/85J9kL08g5CipRxfwGn7DMTaPc9DgAAAABJRU5ErkJggg==";
    // ***** VARS ***** //
    var button = this;
    var buttonID = this.getAttribute("id");
    var prefstring = "custombuttons.BA."+buttonID+".preferences";
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    this.BookmarksList = new Array();
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                       .getService(Components.interfaces.nsIWindowMediator);
    var TabArr = new Array();
    var tab = "";
    var title = "";
    var url = "";
    var img = "";
    var l = 0;
    // ***** USED TO ADD THE ITEMS TO THE CONTEXT MENU ***** //
    function addMenuItem(aNode, aObject, aIndex, aLabel, aURL, aImage) {
    	var mi = aNode.appendChild(document.createElement("menuitem"));        
    	var commandstring = "gBrowser.selectedTab = openUILink('"+aURL+"', event, false, true);";
    	mi.setAttribute("oncommand", commandstring);
    	mi.setAttribute("onclick", "checkForMiddleClick(this, event)");
    	mi.setAttribute("index", aIndex);
    	mi.setAttribute("label", aLabel);
    	mi.setAttribute("url", aURL);
    	mi.setAttribute("type", "menuitem-iconic bookmark-item");
    	mi.setAttribute("image", aImage);
    	if (button.TooltipPref == 0) {
    		mi.tooltipText = aURL;
    	}
    	else {
    		if (button.TooltipPref == 1) {
    			mi.tooltipText = aLabel+" - "+aURL;
    		}
    		else {
    			mi.tooltipText = aLabel;
    		}
    	}
    }
    // ***** ADDS THE MENU ITEMS TO THE CONTEXT MENU ***** //
    const popupID = "cbContext-BA-"+buttonID;
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.populateMenu(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    // ***** POPULATES THE CONTEXT MENU WITH THE BOOKMARKS ***** //
    this.populateMenu = function(aNode) {
    	while (aNode.hasChildNodes())
    		aNode.removeChild(aNode.firstChild);
    	button.BookmarksList = new Array();
    	GetBookmarks();
    	var l = button.BookmarksList.length;
    	var firstURL = button.BookmarksList[0][1];
    	if (firstURL == "") {
    		aNode.appendChild(document.createElement("menuitem"));
    		aNode.firstChild.setAttribute("label", "No button bookmarks");
    		aNode.firstChild.setAttribute("disabled", "true");
    		return;
    	}
    	else {
    		for(var i = 0; i < l; i++) {
    			var cTitle = button.BookmarksList[i][0];
    			var cURL = button.BookmarksList[i][1];
    			var cImage = button.BookmarksList[i][2];
    			addMenuItem(pop, this, i, cTitle, cURL, cImage);
    		}
    	}
    	aNode.appendChild(document.createElement("menuseparator"));
    	var mItemA = aNode.appendChild(document.createElement("menuitem"));
    	mItemA.setAttribute("oncommand", "OpenAllInTabs();");
    	mItemA.setAttribute("label", "Open all in tabs");
    	mItemA.setAttribute("image", imgTabs);
    	var mItemB = aNode.appendChild(document.createElement("menuitem"));
    	mItemB.setAttribute("oncommand", "OpenAllInWin();");
    	mItemB.setAttribute("label", "Open all in new window");
    	mItemB.setAttribute("image", imgWin);
    	var mItemC = aNode.appendChild(document.createElement("menuitem"));
    	mItemC.setAttribute("oncommand", "ClearBookmarks();");
    	mItemC.setAttribute("label", "Clear button bookmarks");
    	mItemC.setAttribute("image", imgClear);
    }
    // ***** SHOW POPUP FUNCTION ***** // 
    this.showPopup = function(node) {
    	var popup = document.getElementById("cbContext-BA-"+buttonID);
    	var x = node.boxObject.x;
    	var y = node.boxObject.y + node.boxObject.height + 24;
    	document.popupNode = node;
    	popup.showPopup(node, x, y, "popup", null, null);
    }
    // ***** FUNCTIONS ***** //
    function PrepArr() {
      var CleanArr = new Array();
      var l = TabArr.length;
      for (var i = 0; i < l; i++) {
        CleanArr[CleanArr.length] = [];
        var label = TabArr[i][0];
        CleanArr[i] = [label, TabArr[i][3], TabArr[i][2]];
      }
      CleanArr[CleanArr.length] = ["Button-bookmark all tabs", false, "All"];
      return CleanArr;
    }
    function GetTabArray() {
    	TabArr = new Array();
            var allLinks = "";
            var thisLink = "";
    	tab = "";
    	title = "";
    	url = "";
    	img = "";
    	l = gBrowser.browsers.length;
    	var browserEnumerator = wm.getEnumerator("navigator:browser");
    	var browserWin = browserEnumerator.getNext();
    	var tabbrowser = browserWin.getBrowser();
    	for (var i = 0; i < l; i++) {
    		title = gBrowser.getBrowserAtIndex(i).webNavigation.document.title;
    		url = gBrowser.getBrowserAtIndex(i).webNavigation.currentURI.spec;
    		if (url == "about:blank") {
    	    	    title = "(Untitled blank tab)";
                        img = defaultfavicon;
    		}
    		else {
                        img = tabbrowser.mTabs[i].image || defaultfavicon;
                        if (url.match("maps.google")) {
                          allLinks = gBrowser.getBrowserAtIndex(i).contentDocument.getElementsByTagName('a');
                          for(var j=0; j < allLinks.length; j++) {
                              thisLink = allLinks[j];
                              if (thisLink.innerHTML.match( /Link/)) {
                                  url = thisLink;
                              }
                          }
                        }
    		}
    		TabArr[i] = [title, url, i, BeginSelected, img];
    	}
    }
    function GetBookmarks() {
    	var splitting = new Array();
            var prefs = "";
    	try {
    		prefs = custombuttons.getPrefs(prefstring);
    	} 
    	catch(ex) {                                      
    		Msg.aMsg("No bookmarked tabs, left click the button to bookmark all tabs to the button.");
    		return;
    	}
    	splitting = prefs.split("#|#");
    	for (var i = 0; i < splitting.length; i++) {
    		var TabStr = "";
    		var j = 0;
    		var k = 0;
    		var l = 0;
    		TabStr = splitting[i];
    		l = TabStr.length;
    		j = TabStr.indexOf('#~#');
    		var TabTitle = TabStr.substring(0,j);
    		j = j + 3;
    		TabStr = TabStr.substring(j,l)
    		k = TabStr.indexOf('#~#');
    		var TabURL = TabStr.substring(0,k);
    		k = k + 3;
    		var TabImage = TabStr.substring(k,l);
    		button.BookmarksList[i] = [TabTitle, TabURL, TabImage];
            }
    }
    ClearBookmarks = function() {
        custombuttons.setPrefs(prefstring,"");
        button.BookmarksList = new Array();
    };
    BookmarkAll = function() {
        ClearBookmarks();
        GetTabArray();
        tab = "";
        title = "";
        url = "";
        img = "";
        var tL = TabArr.length;
        for (var m = 0; m < tL; m++) {
            if(m > 0) {
                tab += "#|#";
            }
            title = TabArr[m][0];
            url = TabArr[m][1];
            if (url == "about:blank") {
                title = "(Untitled blank tab)";
                img = defaultfavicon;
            }
            else {
                img = TabArr[m][4] || defaultfavicon;
            }
            tab += title + "#~#" + url + "#~#" + img;
    	} 
    	custombuttons.setPrefs(prefstring,tab);
    };
    OpenAllInTabs = function() {
            GetBookmarks();
            var mFirstURL = button.BookmarksList[0][1];
            if (mFirstURL != "") {
                for (var i = 0; i < button.BookmarksList.length; i++)
                {
            	    if (i == 0) {
            		    gBrowser.selectedTab = gBrowser.addTab(button.BookmarksList[i][1]);
            	    }
            	    else {
            		    gBrowser.addTab(button.BookmarksList[i][1]);
            	    }
                }
            }
    };
    OpenAllInWin = function() {
            GetBookmarks();
            var mFirstURL = button.BookmarksList[0][1];
            if (mFirstURL != "") {
    	    window.open();
                var NewWin = wm.getMostRecentWindow ("navigator:browser");
                var cBrowser = NewWin.gBrowser;
                for (var i = 0; i < button.BookmarksList.length; i++)
                {
            	    if (i == 0) {
            		    cBrowser.selectedTab = cBrowser.addTab(button.BookmarksList[i][1]);
            	    }
            	    else {
            		    cBrowser.addTab(button.BookmarksList[i][1]);
            	    }
                }
                cBrowser.mTabContainer.advanceSelectedTab(-1, true);
                cBrowser.removeCurrentTab();
            }
    };
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) {
    	GetTabArray();
            var ChkBxArr = new Array();
            ChkBxArr = PrepArr();
    	var SaveAll = false;
            var ChkBxDia = custombuttons.checkboxDialog(this,ChkBxArr,"Bookmark All","Please select the tabs you would like to bookmark:",null,null,"Bookmark","Cancel",null,null,null,null);
    	if (ChkBxDia) {
    		var pL = ChkBxArr.length;
    		var aL = TabArr.length;
    		for (var q = 0; q < pL; q++) {
    			if (ChkBxArr[q][2] == "All" && ChkBxArr[q][1]) {
    				SaveAll = true;
    			}
    		}
    		for (var k = 0; k < aL; k++) {
    			TabArr[k][3] = SaveAll;
    		}
    		if (SaveAll == false) {			
    			for (var j = 0; j < pL; j++) {
    				for (var n = 0; n < aL; n++) {
    		  			if (TabArr[n][2] == ChkBxArr[j][2] && ChkBxArr[j][1]) {
    		    			    TabArr[n][3] = true;
    		  			}
    				}
    			}
    		}
    		ClearBookmarks();
    		title = "";
    		url = "";
    		img = "";
    		var lowest = 0;
    		var found = false;
    		while (found == false) {
    			if (TabArr[lowest][3] == true) {
    				found = true;
    			}
    			else {
    				lowest = lowest + 1;
    			}
    		}
    		for (var m = 0; m < aL; m++) {
    			if (TabArr[m][3] == true) {
    				if(m > lowest) {
    					tab += "#|#";
    				}
    				title = TabArr[m][0];
    				url = TabArr[m][1];
    				if (url == "about:blank") {
    					title = "(Untitled blank tab)";
    					img = defaultfavicon;
    				}
    				else {
    					img = TabArr[m][4] || defaultfavicon;
    				}
    				tab += title + "#~#" + url + "#~#" + img;
    			}
    		}
    	}    	 
            custombuttons.setPrefs(prefstring,tab);  
    }
    this.sleftclick = function(evt) {
            BookmarkAll();
    };
    this.midclick = function(evt) {
            OpenAllInTabs();
    };
    this.smidclick = function(evt) {
            OpenAllInWin();
    };
    this.rightclick = function(evt) {
    	// Open button's bookmark context menu (allowing opening of individual items from the list).
    	this.showPopup(this);
    };
    this.aleftclick = function(evt) {
    	ClearBookmarks();
    };
    // ***** INITIALISATION ***** //
    this.tooltipText = "" +
      "Bookmark All:                                                                                   \n"+
      "  L:\t\t\tOpen prompt to choose tabs to button-bookmark\n"+
      "  Alt+L:\t\tClears button-bookmarks\n"+
      "  Shift+L:\t\tButton-bookmark all tabs\n"+
      "  M:\t\t\tOpen the button-bookmarks in new tabs\n"+
      "  Shift+M:\tOpen the button-bookmarks in a new window\n"+
      "  R:\t\t\tOpen the context menu of button-bookmarks";
    this.setAttribute("context", popupID);
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','11.1 (2009-03-09)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-all-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-all-button.html');

    Help Tab

    Shift+Left click   = Button-bookmark all tabs
    Alt+Left click     = Clears button-bookmarks
    Left click             = Open prompt to choose tabs to button-bookmark
    Middle click         = Open the button-bookmarks in new tabs
    Shift+Middle click = Open the button-bookmarks/stored URLs in a new window
    Right click           = Open the context menu of button-bookmarks
  45. Bookmark this page

    Code Tab

    /*Code*/
    // =============================================================================

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler -------------------*/
    this.leftclick   = function(evt){
    	    PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksMenuFolderId);
    }
    this.midclick    = function(evt){
    	PlacesCommandHook.showPlacesOrganizer('AllBookmarks');
    }
    this.rightclick  = function(evt){
    	toggleSidebar('viewBookmarksSidebar');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20090322');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-page.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText += '\n L= Bookmark this Page | M= Bookmarks Manager | R= Bookmarks Sidebar ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-page.html');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-page.html');

    Help Tab

    /*Help*/
         Left-click: Opens the new bookmark dialog
         Middle-click: Opens the Bookmarks Manager
         Right-click: Toggle the Boolmarks Sidebar
         Shift-Right-click: Context Menu
         
  46. Bookmark this page

    Code Tab

    /*Code*/
    // =============================================================================

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler -------------------*/
    this.leftclick   = function(evt){
    	    PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksMenuFolderId);
    }
    this.midclick    = function(evt){
    	PlacesCommandHook.showPlacesOrganizer('AllBookmarks');
    }
    this.rightclick  = function(evt){
    	toggleSidebar('viewBookmarksSidebar');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20090322');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-page.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText += '\n L= Bookmark this Page | M= Bookmarks Manager | R= Bookmarks Sidebar ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-page.html');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-page.html');

    Help Tab

    /*Help*/
         Left-click: Opens the new bookmark dialog
         Middle-click: Opens the Bookmarks Manager
         Right-click: Toggle the Boolmarks Sidebar
         Shift-Right-click: Context Menu
         
  47. Bookmark this page (with Bookmarks Menu)

    Code Tab

    /*Code*/
    // =============================================================================

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    var self=this,cb=custombuttons,num=cb.getNumber(this.id),menuName='bookmarksMenu',popupID="cb2bMtPmenu-"+menuName+num,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    // translation strings
    function l(str) {
      self.properties = {
        en_US:{             // English US translation by nicholas
          Label:              "%1 (with %8)",
          Bmenu_7:            "%2 Menu",
          Name_1:             "Bookmark this page",
          Bmenu_8:            "%7",
          Bsbar_6:            "%2 Sidebar",
          Bmarks_2:           "Bookmarks",
          Bmanager_5:         "%2 Manager",
          DRight:             "D-R",
          Left:               "L",
          Middle:             "M",
          Right:              "R",
          ShiftClick_3:       "Shift-Click",
          Context_4:          "Context Menu",
          Help:               "     Left-click: Opens the %7"+"\n"+
                              "     Middle-click: %1"+"\n"+
                              "     Right-click: Toggle the %6"+"\n"+
                              "     Double-Right-click: Opens the new bookmark dialog"+"\n"+
                              "\n"+
                              "     %3: %4",
        }
      };
      var tstr = cb.getLocalString(self, str);
      // Operations to handle replacements
      if (tstr.match(/[%]\w{1}/g)) {
        for(prop in self.properties[lang]) {
          if ((prop.match(/[_]\w{1}$/)) && ((prop.substr(prop.lastIndexOf("_")+1)) == (tstr.substring(tstr.indexOf("%")+1, tstr.indexOf("%")+2)))) {
            var tok = tstr.substring(tstr.indexOf("%"), tstr.indexOf("%")+2);
            tstr = tstr.replace(tok, l(prop));
          }
        }
      }
      return tstr;
    }
    // get our bookmarks menu
    document.getElementById(menuName).setAttribute('collapsed','true');
    // function to create the menu and append it to the button
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      self.appendChild(mPop);
    }
    // function to show popup
    this.showPopup = function(node) {
      var popup = document.getElementById(popupID);
      document.popupNode = node;
      popup.openPopup(node, "after_start", null, null, "popup", null, null);
    }
    this.leftclick = function(evt){
      // only run this function when clicking directly on the button
      if (evt.originalTarget.id == this.id) this.showPopup(this);
    }
    this.midclick = function(evt){
      // only run this function when clicking directly on the button
      if (evt.originalTarget.id == this.id) PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksMenuFolderId);
    }; this.cleftclick = this.midclick;
    this.rightclick  = function(evt){
      // only run this function when clicking directly on the button
      if (evt.originalTarget.id == this.id) toggleSidebar('viewBookmarksSidebar');
      // if target is not the button then use onclick from menuitem
      else if (this.getAttribute("onclick")) this.getAttribute("onclick");
      // if the target didn't have an onclick do the command
      else this.getAttribute("command");
    }
    this.rightDclick = function(evt) {
      // only run this function when clicking directly on the button
      if (evt.originalTarget.id == this.id) PlacesCommandHook.showPlacesOrganizer('AllBookmarks');
    };
    // Language dependent attributes
    this.label = l("Label");
    this.setAttribute("Help", l('Help'));
    this.tooltipText =  l("Name_1")+"                     \n"+
                        "\t"+l("Left")+": "+l("Bmenu_7")+"\n"+
                        "\t"+l("Middle")+": "+l("Name_1")+"\n"+
                        "\t"+l("Right")+": "+l("Bsbar_6")+"\n"+
                        "\t"+l("DRight")+": "+l("Bmanager_5")+"\n"+
                        "\t"+l("ShiftClick_3")+": "+l("Context_4");
    // drag and drop functions
    this.setAttribute("ondragenter","PlacesMenuDNDController.onBookmarksMenuDragEnter(event); this.showPopup(this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, BookmarksMenuDropHandler);");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, BookmarksMenuDropHandler);");
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.setAttribute('ondblclick', 'custombuttons.gQuot.mHandler(event, this )');
    this.setAttribute('onmousedown', 'if(event.button == 0) this.leftclick(event);');
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute('author','jw25, nicholas');
    this.setAttribute('version','20090420');
    this.setAttribute('dependency','Fx3, FL2, MF');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    // run our button attachment function but only after 5 seconds for timing issues
    setTimeout(this.initBtn, 5000);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-page.html');

    Help Tab

         Left-click: Opens the Bookmarks Menu
         Middle-click: Bookmark this page
         Right-click: Toggle the Bookmarks Sidebar
         Double-Right-click: Opens the new bookmark dialog
         Shift-Click: Context Menu
  48. Bookmark To

    Code Tab

    /* -------------------------------------------------------------
         Bookmark To
         Bookmark current page to Firefox Bookmarks
         or to online bookmarking services
           - Blinklist
           - del.icio.us
           - Furl
           - Google Bookmarks
           - Ma.gnolia
           - Shadows
           - Simply
           - Spurl
           - Technorati Favorites
           - Wink
           - Yahoo! My Web 2.0
         Last updated: 2007-02-24
       ------------------------------------------------------------- */
    

    Initialization Tab

    var brandName = document.getElementById("bundle_brand").getString("brandShortName");
    this.bookmarkTo = function(aEvent) {
      var aTitle = content.document.title;
      var aURL = content.location.href;
      var meta = content.document.getElementsByTagName("meta");
      for (var i = 0; i < meta.length; i++) {
        if (meta[i].hasAttribute("name") &&
            (meta[i].getAttribute("name").toLowerCase() == "description")
        ) {
          var desc = meta[i].getAttribute("content");
        }
      }
      switch(aEvent.target.getAttribute("label")) {
        case brandName + " Bookmarks":
          BookmarksUtils.addBookmark(aURL, aTitle);
          break;
        case "Blinklist":
          gBrowser.loadOneTab("http://www.blinklist.com/index.php?Action=Blink/addblink.php" +
                              "?Url=" + escape(aURL) +
                              "&Title=" + escape(aTitle),
                              null, null, null, false);
          break;
        case "del.icio.us":
          gBrowser.loadURI("http://del.icio.us/post?url=" + escape(aURL) + "&title=" + escape(aTitle));
          break;
        case "Furl":
          gBrowser.loadOneTab("http://www.furl.net/storeIt.jsp?u=" + escape(aURL) + "&t=" + escape(aTitle),
            null, null, null, false);
          break;
        case "Google Bookmarks":
          gBrowser.loadOneTab("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=" +
                              escape(aURL) + "&title=" + escape(aTitle),
                              null, null, null, false);
          break;
        case "Ma.gnolia":
          gBrowser.loadOneTab("http://ma.gnolia.com/bookmarklet/popup/add" +
                              "?url=" + encodeURIComponent(aURL) +
                              "&title=" + encodeURIComponent(aTitle) +
                              "&description=" + encodeURIComponent(desc),
                              null, null, null, false);
          break;
        case "Shadows":
          gBrowser.loadOneTab("http://www.shadows.com/features/tcr.htm?url=" + escape(aURL) + "&title=" + escape(aTitle),
            null, null, null, false);
          break;
        case "Simply":
          gBrowser.loadOneTab("http://simpy.com/simpy/LinkAdd.do?v=6&href=" + escape(aURL) + "&title=" + escape(aTitle),
            null, null, null, false);
          break;
        case "Spurl":
          gBrowser.loadOneTab("http://www.spurl.net/spurl.php?v=3&url=" + escape(aURL) + "&title=" + escape(aTitle),
            null, null, null, false);
          break;
        case "Technorati Favorite":
          gBrowser.loadOneTab("http://technorati.com/faves?add=" + escape(aURL),
            null, null, null, false);
          break;
        case "Wink":
          gBrowser.loadOneTab("http://wink.com/_/tag?&teact=tedoc&url=" + escape(aURL) + "&doctitle=" + escape(aTitle),
            null, null, null, false);
          break;
        case "Yahoo! My Web 2.0":
          gBrowser.loadOneTab("http://synergy2.search.yahoo.com/myresults/bookmarklet?u=" + escape(aURL) + "&t=" + escape(aTitle),
            null, null, null, false);
      }
    }
    function addMenuitem(aNode, aLabel) {
      var mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.tooltipText = "Bookmark this page to " + aLabel;
      mItem.setAttribute("label", aLabel);
      mItem.setAttribute("oncommand", "this.parentNode.parentNode.bookmarkTo(event)");
      if((aLabel.indexOf(brandName) != -1)) {
        var mSeparator = aNode.appendChild(document.createElement("menuseparator"));
        mSeparator.id = "bookmarkto-separator";
      }
    }
    var mPopup = this.appendChild(document.createElement("menupopup"));
    addMenuitem(mPopup, brandName + " Bookmarks");
    addMenuitem(mPopup, "Blinklist");
    addMenuitem(mPopup, "del.icio.us");
    addMenuitem(mPopup, "Furl");
    addMenuitem(mPopup, "Google Bookmarks");
    addMenuitem(mPopup, "Ma.gnolia");
    addMenuitem(mPopup, "Shadows");
    addMenuitem(mPopup, "Simply");
    addMenuitem(mPopup, "Spurl");
    addMenuitem(mPopup, "Technorati Favorite");
    addMenuitem(mPopup, "Wink");
    addMenuitem(mPopup, "Yahoo! My Web 2.0");
    this.setAttribute("ondragover",
      "nsDragAndDrop.dragOver(event, bookmarksButtonObserver)");
    this.setAttribute("ondragdrop",
      "nsDragAndDrop.drop(event, bookmarksButtonObserver)");
    this.setAttribute("ondragexit",
      "nsDragAndDrop.dragExit(event, bookmarksButtonObserver)");
    this.type = "menu";
    this.tooltipText = "Bookmark this page to...";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark.html');
    

    Help Tab

  49. Bookmark to folder (multiple tab version)

    Code Tab

    /*
        If this is your first time using the button, middle click it to choose the folder for bookmarks to go into in the future.
        When you left click on the button after this, it will ask you to select the tabs to bookmark (using a checkbox dialogue) and then bookmark them to the selected folder.
        If you did not choose a folder before you first left clicked on the button, or AlwaysSelectFolder is set to true, you'll be prompted to select a folder to bookmark to before anything is bookmarked.
        You can middle click the button to re-select the folder for bookmarks to go into.
        A lot of this code is adapted from examples from the Mozilla Developer Centre website.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** USER PREFS ***** //
    /*
    	AlwaysSelectFolder controls when you will be asked to select the folder for bookmarks to be saved in
    		true  = the button will ask you everytime you try to bookmark a tab
    		false = the button will only ask you the first time you bookmark a tab
    	BeginSelected controls the state of the checkboxes in the dialogue opened on left click.
    		true  = the checkboxes for the tabs will all be checked to start with
    		false = the checkboxes for the tabs will all be unchecked to start with
    	ClearFolder controls whether the button clears the target folder for the bookmarks before it adds the new ones
    		0 = clear target folder and then add bookmarks
    		1 = ask if you want to clear the target folder when bookmarking
    		2 = do not clear target folder, just add bookmarks
    	ShowAlerts controls whether alerts are shown by the button
    		true  = show alerts
    		false = don't show alerts
    */
    var AlwaysSelectFolder = false;
    var BeginSelected = false;
    var ClearFolder = 2;
    var ShowAlerts = true;
    // ***** VARS ***** //
    var install_time = 1290304297;
    var Cb = custombuttons;
    var num = Cb.getNumber(this.id);
    var prefstring = "custombuttons.bookmarktofolder-"+num;
    var button = this;
    var NameStr = "Bookmark to folder";
    var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsINavHistoryService);
    var options = historyService.getNewQueryOptions();
    var query = historyService.getNewQuery();
    var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
    var menuFolder = bmsvc.bookmarksMenuFolder; // Bookmarks menu folder
    var toolbarFolder = bmsvc.toolbarFolder; // Bookmarks/Personal toolbar folder
    var unsortedFolder = bmsvc.unfiledBookmarksFolder; // Unsorted bookmarks folder
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
    this.BookmarksList = new Array();
    var TabArr = new Array();
    var tab = "";
    var title = "";
    var uri = "";
    var l = 0;
    // ***** FUNCTIONS ***** //
    function GetPref(pref)
    {
    	if (Cb.getPrefs(prefstring+".install-time") == install_time) {
    		return [true, Cb.getPrefs(prefstring+pref)];
    	} else {
    		Cb.setPrefs(prefstring+pref, "");
    		return [false, ""];
    	}
    }
    function PrepArr() {
    	var CleanArr = new Array();
    	var l = TabArr.length;
    	for (var i = 0; i < l; i++) {
    		CleanArr[CleanArr.length] = [];
    		var label = TabArr[i][0];
    		CleanArr[i] = [label, TabArr[i][3], TabArr[i][2]];
    	}
    	CleanArr[CleanArr.length] = ["Bookmark all tabs", false, "All"];
    	return CleanArr;
    }
    function GetTabArray() {
    	TabArr = new Array();
    	var allLinks = "";
    	var thisLink = "";
    	tab = "";
    	title = "";
    	uri = "";
    	l = gBrowser.browsers.length;
    	var browserEnumerator = wm.getEnumerator("navigator:browser");
    	var browserWin = browserEnumerator.getNext();
    	var tabbrowser = browserWin.getBrowser();
    	for (var i = 0; i < l; i++) {
    		title = gBrowser.getBrowserAtIndex(i).webNavigation.document.title;
    		uri = gBrowser.getBrowserAtIndex(i).webNavigation.currentURI;
    		if (uri.spec == "about:blank")
    			title = "about:blank";
    		TabArr[i] = [title, uri, i, BeginSelected];
    	}
    }
    function BkmrkFolderSelBox(CurrPath, FolderID)
    {
    	var SelBoxArr = new Array();
    	query.setFolders([FolderID], 1);
    	var result = historyService.executeQuery(query, options);
    	var rootNode = result.root;
    	rootNode.containerOpen = true;
    	SelBoxArr[0] = "Use this folder";
    	// iterate over the immediate children of this folder and add to array
    	for (var i = 0; i < rootNode.childCount; i ++) {
    		var node = rootNode.getChild(i);
    		if (node.type == 6) {
    			SelBoxArr[SelBoxArr.length] = node.title;
    		}
    	}
    	// close a container after using it!
    	rootNode.containerOpen = false;
    	if (SelBoxArr.length == 1)
    		return [false, "defaulted"];
    	var cbSelBox = Cb.selectBox(NameStr+":", "Please select the bookmarks folder to send bookmarks to: (Currently: "+CurrPath+" )", SelBoxArr);
    	if (cbSelBox[0] == false) {
    		if (ShowAlerts)
    			Cb.alertSlide(NameStr+":", "Cancelled, no folder selected.");
    		return [false, "cancelled"];
    	} else {
    		var SelectedFolder = {id: bmsvc.getChildFolder(FolderID, SelBoxArr[cbSelBox[1].value]), title: SelBoxArr[cbSelBox[1].value]};
    		return [true, "selected", SelectedFolder];
    	}
    	return [false, cancelled];
    }
    function SelectFolder()
    {
    	Selecting = true;
    	Status = "";
    	SelPath = "";
    	var SelBoxArr = new Array();
    	SelBoxArr[0] = "Bookmarks Menu";
    	SelBoxArr[1] = "Bookmarks Toolbar";
    	SelBoxArr[2] = "Unsorted Bookmarks";
    	var FoldersArr = new Array();
    	FoldersArr[0] = {id: menuFolder, title: "Bookmarks Menu"};
    	FoldersArr[1] = {id: toolbarFolder, title: "Bookmarks Toolbar"};
    	FoldersArr[2] = {id: unsortedFolder, title: "Unsorted Bookmarks"};
    	var cbSelBox = Cb.selectBox(NameStr+":", "Please select the bookmarks folder to send bookmarks to:", SelBoxArr);
    	if (cbSelBox[0] == false) {
    		if (ShowAlerts)
    			Cb.alertSlide(NameStr+":", "Cancelled, no folder selected.");
    		return;
    	} else {
    		Folder = FoldersArr[cbSelBox[1].value];
    	}
    	while (Selecting == true) {
    		SelPath = SelPath+Folder.title+"/";
    		ChooseFolder = BkmrkFolderSelBox(SelPath, Folder.id);
    		Selecting = ChooseFolder[0];
    		Status = ChooseFolder[1];
    		if (Selecting && (ChooseFolder[2].id != 0))
    			Folder = ChooseFolder[2];
    		else
    			Selecting = false;
    	}
    	if (Status != "cancelled") {
    		Cb.setPrefs(prefstring+".folder", ""+Folder.id);
    		Cb.setPrefs(prefstring+".install-time", install_time);
    		button.tooltipText = 'L: Bookmark selected tabs to "'+bmsvc.getItemTitle(Folder.id)+'"'+"\n"+"M: Select the folder being bookmarked to";
    		return true;
    	} else {
    		return false;
    	}
    }
    function Bookmark()
    {
    	var pFolderID = Cb.getPrefs(prefstring+".folder");
    	try {
    		var test = bmsvc.getItemTitle(pFolderID)
    	} catch(error) {
    		if (Cb.confirmBox(NameStr, "There was a problem accessing the folder that you are trying to bookmark to, the most probable cause of this is the folder has been removed since you selected it."+"\n"+"\n"+"Would you like to select a different folder to bookmark to?", "Yes", "No")) {
    			if (SelectFolder())
    				pFolderID = Cb.getPrefs(prefstring+".folder");
    			else
    				return;
    		} else {
    			return;
    		}
    	}
    	GetTabArray();	
    	var ChkBxArr = new Array();
    	ChkBxArr = PrepArr();
    	var SaveAll = false;
    	var ChkBxDia = Cb.checkboxDialog(this,ChkBxArr,NameStr,"Please select the tabs you would like to bookmark:",null,null,"Bookmark","Cancel",null,null,null,null);
    	if (ChkBxDia) {
    		var pL = ChkBxArr.length;
    		var aL = TabArr.length;
    		for (var q = 0; q < pL; q++) {
    			if (ChkBxArr[q][2] == "All" && ChkBxArr[q][1]) {
    				SaveAll = true;
    			}
    		}
    		for (var k = 0; k < aL; k++) {
    			TabArr[k][3] = SaveAll;
    		}
    		if (SaveAll == false) {			
    			for (var j = 0; j < pL; j++) {
    				for (var n = 0; n < aL; n++) {
    					if (TabArr[n][2] == ChkBxArr[j][2] && ChkBxArr[j][1]) {
    						TabArr[n][3] = true;
    					}
    				}
    			}
    		}
    		if (ClearFolder == 0)
    			bmsvc.removeFolderChildren(pFolderID);
    		else if (ClearFolder == 1)
    			if (Cb.confirmBox(NameStr, "Overwrite existing bookmarks?", "Yes", "No"))
    				bmsvc.removeFolderChildren(pFolderID);
    		title = "";
    		uri = "";
    		var lowest = 0;
    		var found = false;
    		while (found == false) {
    			if (TabArr[lowest][3] == true) {
    				found = true;
    			} else {
    				lowest = lowest + 1;
    			}
    		}
    		for (var m = 0; m < aL; m++) {
    			if (TabArr[m][3] == true) {
    				if(m > lowest) {
    					tab += "#|#";
    				}
    				title = TabArr[m][0];
    				uri = TabArr[m][1];
    				if (uri.spec == "about:blank")
    					title = "about:blank";
    				bmsvc.insertBookmark(pFolderID, uri, -1, title);
    			}
    		}
    	}
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt)
    {
    	if ((!Cb.isPref(prefstring+".folder")) || (GetPref(".folder")[1] == "") || (AlwaysSelectFolder)) {
    		if (SelectFolder()) {
    			Bookmark();
    		}
    	} else {
    		Bookmark();
    	}
    }
    this.midclick = function(evt)
    {
    	SelectFolder();
    };
    // ***** INITIALISATION ***** //
    if ((!Cb.isPref(prefstring+".install-time")) || (Cb.getPrefs(prefstring+".install-time") == ""))
    	Cb.setPrefs(prefstring+".install-time", install_time);
    if ((!Cb.isPref(prefstring+".folder")) || (GetPref(".folder")[1] == "")) {
    	Cb.setPrefs(prefstring+".folder", "");
    	this.tooltipText = "L: Select the folder to be bookmarked to and bookmark selected tabs there"+"\n"+"M: Select the folder to be bookmarked to";
    } else {
    	try {
    		this.tooltipText = 'L: Bookmark selected tabs to "'+bmsvc.getItemTitle(Cb.getPrefs(prefstring+".folder"))+'"'+"\n"+"M: Change the folder being bookmarked to";
    	} catch(error) {
    		this.tooltipText = "L: Select the folder to be bookmarked to and bookmark selected tabs there"+"\n"+"M: Select the folder to be bookmarked to";
    	}
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','5 (2009-03-23)');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.9*');
    this.setAttribute('status','Public');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-folder.html');

    Help Tab

    If this is your first time using the button, middle click it to choose the folder for bookmarks to go into in the future.
    When you left click on the button after this, it will ask you to select the tabs to bookmark (using a checkbox dialogue) and then bookmark them to the selected folder.
    If you did not choose a folder before you first left clicked on the button, or AlwaysSelectFolder is set to true, you'll be prompted to select a folder to bookmark to before anything is bookmarked.
    You can middle click the button to re-select the folder for bookmarks to go into.
  50. Bookmark to folder (single tab version)

    Code Tab

    /*
        If this is your first time using the button, middle click it to choose the folder for bookmarks to go into in the future.
        When you left click on the button after this, it will bookmark the current tab to the selected folder.
        If you did not choose a folder before you first left clicked on the button, you'll be prompted to do so before the current tab is bookmarked.
        You can middle click the button to re-select the folder for bookmarks to go into.
        A lot of this code is adapted from examples from the Mozilla Developer Centre website.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** USER PREFS ***** //
    /*
    	AlwaysSelectFolder controls when you will be asked to select the folder for bookmarks to be saved in
    		true  = the button will ask you everytime you try to bookmark a tab
    		false = the button will only ask you the first time you bookmark a tab
    	ShowAlerts controls whether alerts are shown by the button
    		true  = show alerts
    		false = don't show alerts
    */
    var AlwaysSelectFolder = false;
    var ShowAlerts = true;
    // ***** VARS ***** //
    var install_time = 1290304297;
    var Cb = custombuttons;
    var num = Cb.getNumber(this.id);
    var prefstring = "custombuttons.bookmarktofolder-"+num;
    var button = this;
    var NameStr = "Bookmark to folder";
    var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsINavHistoryService);
    var options = historyService.getNewQueryOptions();
    var query = historyService.getNewQuery();
    var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
    var menuFolder = bmsvc.bookmarksMenuFolder; // Bookmarks menu folder
    var toolbarFolder = bmsvc.toolbarFolder; // Bookmarks/Personal toolbar folder
    var unsortedFolder = bmsvc.unfiledBookmarksFolder; // Unsorted bookmarks folder
    // ***** FUNCTIONS ***** //
    function GetPref(pref)
    {
    	if (Cb.getPrefs(prefstring+".install-time") == install_time) {
    		return [true, Cb.getPrefs(prefstring+pref)];
    	} else {
    		Cb.setPrefs(prefstring+pref, "");
    		return [false, ""];
    	}
    }
    function BkmrkFolderSelBox(CurrPath, FolderID)
    {
    	var SelBoxArr = new Array();
    	query.setFolders([FolderID], 1);
    	var result = historyService.executeQuery(query, options);
    	var rootNode = result.root;
    	rootNode.containerOpen = true;
    	SelBoxArr[0] = "Use this folder";
    	// iterate over the immediate children of this folder and add to array
    	for (var i = 0; i < rootNode.childCount; i ++) {
    		var node = rootNode.getChild(i);
    		if (node.type == 6) {
    			SelBoxArr[SelBoxArr.length] = node.title;
    		}
    	}
    	// close a container after using it!
    	rootNode.containerOpen = false;
    	if (SelBoxArr.length == 1)
    		return [false, "defaulted"];
    	var cbSelBox = Cb.selectBox(NameStr+":", "Please select the bookmarks folder to send bookmarks to: (Currently: "+CurrPath+" )", SelBoxArr);
    	if (cbSelBox[0] == false) {
    		if (ShowAlerts)
    			Cb.alertSlide(NameStr+":", "Cancelled, no folder selected.");
    		return [false, "cancelled"];
    	} else {
    		var SelectedFolder = {id: bmsvc.getChildFolder(FolderID, SelBoxArr[cbSelBox[1].value]), title: SelBoxArr[cbSelBox[1].value]};
    		return [true, "selected", SelectedFolder];
    	}
    	return [false, cancelled];
    }
    function SelectFolder()
    {
    	Selecting = true;
    	Status = "";
    	SelPath = "";
    	var SelBoxArr = new Array();
    	SelBoxArr[0] = "Bookmarks Menu";
    	SelBoxArr[1] = "Bookmarks Toolbar";
    	SelBoxArr[2] = "Unsorted Bookmarks";
    	var FoldersArr = new Array();
    	FoldersArr[0] = {id: menuFolder, title: "Bookmarks Menu"};
    	FoldersArr[1] = {id: toolbarFolder, title: "Bookmarks Toolbar"};
    	FoldersArr[2] = {id: unsortedFolder, title: "Unsorted Bookmarks"};
    	var cbSelBox = Cb.selectBox(NameStr+":", "Please select the bookmarks folder to send bookmarks to:", SelBoxArr);
    	if (cbSelBox[0] == false) {
    		if (ShowAlerts)
    			Cb.alertSlide(NameStr+":", "Cancelled, no folder selected.");
    		return;
    	} else {
    		Folder = FoldersArr[cbSelBox[1].value];
    	}
    	while (Selecting == true) {
    		SelPath = SelPath+Folder.title+"/";
    		ChooseFolder = BkmrkFolderSelBox(SelPath, Folder.id);
    		Selecting = ChooseFolder[0];
    		Status = ChooseFolder[1];
    		if (Selecting && (ChooseFolder[2].id != 0))
    			Folder = ChooseFolder[2];
    		else
    			Selecting = false;
    	}
    	if (Status != "cancelled") {
    		Cb.setPrefs(prefstring+".folder", ""+Folder.id);
    		Cb.setPrefs(prefstring+".install-time", install_time);
    		button.tooltipText = 'L: Bookmark current tab to "'+bmsvc.getItemTitle(Folder.id)+'"'+"\n"+"M: Select the folder being bookmarked to";
    		return true;
    	} else {
    		return false;
    	}
    }
    function Bookmark()
    {
    	var pFolderID = Cb.getPrefs(prefstring+".folder");
    	try {
    		var test = bmsvc.getItemTitle(pFolderID)
    	} catch(error) {
    		if (Cb.confirmBox(NameStr, "There was a problem accessing the folder that you are trying to bookmark to, the most probable cause of this is the folder has been removed since you selected it."+"\n"+"\n"+"Would you like to select a different folder to bookmark to?", "Yes", "No")) {
    			if (SelectFolder())
    				pFolderID = Cb.getPrefs(prefstring+".folder");
    			else
    				return;
    		} else {
    			return;
    		}
    	}
    	bmsvc.insertBookmark(pFolderID, gBrowser.selectedBrowser.webNavigation.currentURI, -1, content.document.title);
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt)
    {
    	if ((!Cb.isPref(prefstring+".folder")) || (GetPref(".folder")[1] == "") || (AlwaysSelectFolder)) {
    		if (SelectFolder()) {
    			Bookmark();
    		}
    	} else {
    		Bookmark();
    	}
    }
    this.midclick = function(evt)
    {
    	SelectFolder();
    };
    // ***** INITIALISATION ***** //
    if ((!Cb.isPref(prefstring+".install-time")) || (Cb.getPrefs(prefstring+".install-time") == ""))
    	Cb.setPrefs(prefstring+".install-time", install_time);
    if ((!Cb.isPref(prefstring+".folder")) || (GetPref(".folder")[1] == "")) {
    	Cb.setPrefs(prefstring+".folder", "");
    	this.tooltipText = "L: Select the folder to be bookmarked to and bookmark current tab there"+"\n"+"M: Select the folder to be bookmarked to";
    } else {
    	try {
    		this.tooltipText = 'L: Bookmark current tab to "'+bmsvc.getItemTitle(Cb.getPrefs(prefstring+".folder"))+'"'+"\n"+"M: Change the folder being bookmarked to";
    	} catch(error) {
    		this.tooltipText = "L: Select the folder to be bookmarked to and bookmark current tab there"+"\n"+"M: Select the folder to be bookmarked to";
    	}
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','5 (2009-03-23)');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.9*');
    this.setAttribute('status','Public');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-folder.html');

    Help Tab

    If this is your first time using the button, middle click it to choose the folder for bookmarks to go into in the future.
    When you left click on the button after this, it will bookmark the current tab to the selected folder.
    If you did not choose a folder before you first left clicked on the button, you'll be prompted to do so before the current tab is bookmarked.
    You can middle click the button to re-select the folder for bookmarks to go into.
  51. Bookmark to folder (single tab version)

    Code Tab

    /*
        If this is your first time using the button, middle click it to choose the folder for bookmarks to go into in the future.
        When you left click on the button after this, it will bookmark the current tab to the selected folder.
        If you did not choose a folder before you first left clicked on the button, you'll be prompted to do so before the current tab is bookmarked.
        You can middle click the button to re-select the folder for bookmarks to go into.
        A lot of this code is adapted from examples from the Mozilla Developer Centre website.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** USER PREFS ***** //
    /*
    	AlwaysSelectFolder controls when you will be asked to select the folder for bookmarks to be saved in
    		true  = the button will ask you everytime you try to bookmark a tab
    		false = the button will only ask you the first time you bookmark a tab
    	ShowAlerts controls whether alerts are shown by the button
    		true  = show alerts
    		false = don't show alerts
    */
    var AlwaysSelectFolder = false;
    var ShowAlerts = true;
    // ***** VARS ***** //
    var install_time = 1290304297;
    var Cb = custombuttons;
    var num = Cb.getNumber(this.id);
    var prefstring = "custombuttons.bookmarktofolder-"+num;
    var button = this;
    var NameStr = "Bookmark to folder";
    var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsINavHistoryService);
    var options = historyService.getNewQueryOptions();
    var query = historyService.getNewQuery();
    var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
    var menuFolder = bmsvc.bookmarksMenuFolder; // Bookmarks menu folder
    var toolbarFolder = bmsvc.toolbarFolder; // Bookmarks/Personal toolbar folder
    var unsortedFolder = bmsvc.unfiledBookmarksFolder; // Unsorted bookmarks folder
    // ***** FUNCTIONS ***** //
    function GetPref(pref)
    {
    	if (Cb.getPrefs(prefstring+".install-time") == install_time) {
    		return [true, Cb.getPrefs(prefstring+pref)];
    	} else {
    		Cb.setPrefs(prefstring+pref, "");
    		return [false, ""];
    	}
    }
    function BkmrkFolderSelBox(CurrPath, FolderID)
    {
    	var SelBoxArr = new Array();
    	query.setFolders([FolderID], 1);
    	var result = historyService.executeQuery(query, options);
    	var rootNode = result.root;
    	rootNode.containerOpen = true;
    	SelBoxArr[0] = "Use this folder";
    	// iterate over the immediate children of this folder and add to array
    	for (var i = 0; i < rootNode.childCount; i ++) {
    		var node = rootNode.getChild(i);
    		if (node.type == 6) {
    			SelBoxArr[SelBoxArr.length] = node.title;
    		}
    	}
    	// close a container after using it!
    	rootNode.containerOpen = false;
    	if (SelBoxArr.length == 1)
    		return [false, "defaulted"];
    	var cbSelBox = Cb.selectBox(NameStr+":", "Please select the bookmarks folder to send bookmarks to: (Currently: "+CurrPath+" )", SelBoxArr);
    	if (cbSelBox[0] == false) {
    		if (ShowAlerts)
    			Cb.alertSlide(NameStr+":", "Cancelled, no folder selected.");
    		return [false, "cancelled"];
    	} else {
    		var SelectedFolder = {id: bmsvc.getChildFolder(FolderID, SelBoxArr[cbSelBox[1].value]), title: SelBoxArr[cbSelBox[1].value]};
    		return [true, "selected", SelectedFolder];
    	}
    	return [false, cancelled];
    }
    function SelectFolder()
    {
    	Selecting = true;
    	Status = "";
    	SelPath = "";
    	var SelBoxArr = new Array();
    	SelBoxArr[0] = "Bookmarks Menu";
    	SelBoxArr[1] = "Bookmarks Toolbar";
    	SelBoxArr[2] = "Unsorted Bookmarks";
    	var FoldersArr = new Array();
    	FoldersArr[0] = {id: menuFolder, title: "Bookmarks Menu"};
    	FoldersArr[1] = {id: toolbarFolder, title: "Bookmarks Toolbar"};
    	FoldersArr[2] = {id: unsortedFolder, title: "Unsorted Bookmarks"};
    	var cbSelBox = Cb.selectBox(NameStr+":", "Please select the bookmarks folder to send bookmarks to:", SelBoxArr);
    	if (cbSelBox[0] == false) {
    		if (ShowAlerts)
    			Cb.alertSlide(NameStr+":", "Cancelled, no folder selected.");
    		return;
    	} else {
    		Folder = FoldersArr[cbSelBox[1].value];
    	}
    	while (Selecting == true) {
    		SelPath = SelPath+Folder.title+"/";
    		ChooseFolder = BkmrkFolderSelBox(SelPath, Folder.id);
    		Selecting = ChooseFolder[0];
    		Status = ChooseFolder[1];
    		if (Selecting && (ChooseFolder[2].id != 0))
    			Folder = ChooseFolder[2];
    		else
    			Selecting = false;
    	}
    	if (Status != "cancelled") {
    		Cb.setPrefs(prefstring+".folder", ""+Folder.id);
    		Cb.setPrefs(prefstring+".install-time", install_time);
    		button.tooltipText = 'L: Bookmark current tab to "'+bmsvc.getItemTitle(Folder.id)+'"'+"\n"+"M: Select the folder being bookmarked to";
    		return true;
    	} else {
    		return false;
    	}
    }
    function Bookmark()
    {
    	var pFolderID = Cb.getPrefs(prefstring+".folder");
    	try {
    		var test = bmsvc.getItemTitle(pFolderID)
    	} catch(error) {
    		if (Cb.confirmBox(NameStr, "There was a problem accessing the folder that you are trying to bookmark to, the most probable cause of this is the folder has been removed since you selected it."+"\n"+"\n"+"Would you like to select a different folder to bookmark to?", "Yes", "No")) {
    			if (SelectFolder())
    				pFolderID = Cb.getPrefs(prefstring+".folder");
    			else
    				return;
    		} else {
    			return;
    		}
    	}
    	bmsvc.insertBookmark(pFolderID, gBrowser.selectedBrowser.webNavigation.currentURI, -1, content.document.title);
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt)
    {
    	if ((!Cb.isPref(prefstring+".folder")) || (GetPref(".folder")[1] == "") || (AlwaysSelectFolder)) {
    		if (SelectFolder()) {
    			Bookmark();
    		}
    	} else {
    		Bookmark();
    	}
    }
    this.midclick = function(evt)
    {
    	SelectFolder();
    };
    // ***** INITIALISATION ***** //
    if ((!Cb.isPref(prefstring+".install-time")) || (Cb.getPrefs(prefstring+".install-time") == ""))
    	Cb.setPrefs(prefstring+".install-time", install_time);
    if ((!Cb.isPref(prefstring+".folder")) || (GetPref(".folder")[1] == "")) {
    	Cb.setPrefs(prefstring+".folder", "");
    	this.tooltipText = "L: Select the folder to be bookmarked to and bookmark current tab there"+"\n"+"M: Select the folder to be bookmarked to";
    } else {
    	try {
    		this.tooltipText = 'L: Bookmark current tab to "'+bmsvc.getItemTitle(Cb.getPrefs(prefstring+".folder"))+'"'+"\n"+"M: Change the folder being bookmarked to";
    	} catch(error) {
    		this.tooltipText = "L: Select the folder to be bookmarked to and bookmark current tab there"+"\n"+"M: Select the folder to be bookmarked to";
    	}
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','5 (2009-03-23)');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.9*');
    this.setAttribute('status','Public');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmark-folder.html');

    Help Tab

    If this is your first time using the button, middle click it to choose the folder for bookmarks to go into in the future.
    When you left click on the button after this, it will bookmark the current tab to the selected folder.
    If you did not choose a folder before you first left clicked on the button, you'll be prompted to do so before the current tab is bookmarked.
    You can middle click the button to re-select the folder for bookmarks to go into.
  52. Bookmark Toolbar

    Code Tab

    goToggleToolbar('PersonalToolbar','toggle_personaltoolbar');
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-toolbars.html');

    Help Tab

  53. Bookmarklet to Button

    Code Tab

    /*Code*/
    bn = prompt("New Button Name","NewBMButton");
    bc = prompt("Bookmarklet code", "");
    if (bc) {
    	bc = unescape(bc);
    	bc = bc.replace("javascript:","  ").replace(/([^\.])(document)/gi,  function (str, p1, p2, offset, s) {
                          return p1 + "content." + p2;
                       });
    	G = new Function (bc.replace(/\(null\)/gi, "return false").replace(/|/gi, ""));
    	if (!bn) bn="New Bookmarklet Button";
    	var bcode="/*Code*/\n\n" + G + "\nanonymous();\n";
    	createButton(bn, "chrome://custombuttons/skin/homepage.png", bcode, "/*Initialization Code*/ ", this);
    }
    

    Initialization Tab

    /*Initialization Code*/
    /*--------------- Attributes Block Start ----------------*/
    this.setAttribute("author", "Shajul" );
    this.setAttribute("public",true);
    this.setAttribute("dependency","FF 2.0.*,CB 2.0.*");
    this.setAttribute("version","2.1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bookmarklet-button-button.html');
    this.setAttribute("help","0,To use:\n\nCopy bookmarklet source and paste it when requested. \nA new button will be placed on the toolbar.\n\nYou may want to edit the name to match the bookmarklet, add an image and tweak the code a little!");
    /*---------------- Attributes Block End -----------------*/
    

    Help Tab

    To use:
    Copy bookmarklet source and paste it when requested. 
    A new button will be placed on the toolbar.
    You may want to edit the name to match the bookmarklet
  54. Bookmarks Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='bookmarksMenu',popupID="cb2mBar-"+menuName+num;
    document.getElementById(menuName).setAttribute('collapsed','true');
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      that.appendChild(mPop);
    }
    setTimeout(this.initBtn, 5000);
    // function to show popup
    this.showPopup = function(node) {
      var popup = document.getElementById(popupID);
      document.popupNode = node;
      popup.openPopup(node, "after_start", null, null, "popup", null, null);
    }
    // Our two images, labeled correspondingly
    var imgOpen = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAACB0RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgTVi7kSokAAACb0lEQVR4nGWSS29NYRSGn73P7jmnpz0uLY00DWnqVqQqISpCWgbiFgMTBsKIhl9ADMzFX/ArDIgBAwYiESJpxSUqLaE9PZfa+1z2931rGex9eorBylrfYD1533d9HuAB2bT7aXn/9PYMIEAIxKqq3sXr97cBk8A4MLmpb9346PZBujI+xWKBUnmF5WrIh88/qsDbtKrAc2AuKOSyc3t2DjG6Y4iDY8P0byzieT4vX85y7Ng+Hj76yuOPJQb2jm+Ym1+anPtUmmyGIdOnsnybX8KP6i1G9h/m9NQBBjb1EQQ5MpkssRUazmf6wSznL+9j4vQuLt04ykIpy/SZjYxNHEe7evER5c2nCqpdeF4Gz/cQD0ShYRSArkKeF19a/Ko4AO7cPJfsiCQANQbnIJNJUlJNACLJu1oXFkNLtZEAnAM1BkQIVBVJAU7BCVhJZrsKsFjjqEbJIZwFMQZ1QoAoahNA7DoA6/4GmNhSWqx3FFiDihIgrCpo2ES2FTAOYpsCwpioVkfUrALEGHBCwBoLrTjxbgVaDqIUUItiwlpIy9O/ACpCoGssRKZj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98/j88/j99vn9+Pr9+Pv9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaT/wlwAAAEB0Uk5T////////////////////////////////////////////////////////////////////////////////////AMJ7sUQAAAEJSURBVHjaXc5lUwJgEATgW7tBBUEERMDubg9BUbEb7O7u7u7ARv2rvnz1Pu08M7tzxFZSgoxM2CMdsE/S5rgUqjTbmcYLXpjaE26Z6rd3mQxBmETbGpN6FDl4OmOSNwE4n2HiWpspVsIipAZaO+wiNFqmJjwceibXz0DZVYyW6eOrNP9AE8X06sxN3FQpmB5u/L0XI2RM18cbcwthAaJuKzeFuHcq0qrqsvyyM7w8Ox2tRgF619IvRgr7Md1j2NIJ0H6OfaMvrwSHzugTjQDV2+A7ipMysXOvPo0UoHhueUSyTzxWL5XrcgHhdw0XKBr2xeyRbChUgCQ9uLqmu6t3fmVZSux+/9/9AQljQ0AosBQ/AAAAAElFTkSuQmCC';
    // toggles the image to Open State
    this.toggleImgOpen = function() {
        this.setAttribute("image",imgOpen);
    }
    // latter
    this.toggleImgClosed = function() {
      this.setAttribute("image",imgClosed);
    }
    // Hide that stupid dropmarker that no one ever seems to want
    var that = this;
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 10);
      }
    }
    this.hideDropMarker();
    this.type = "menu"; // make it a menu
    this.setAttribute("class", "menu-iconic");
    this.image = imgClosed; // make sure it initializes with the correct image
    // drag and drop functions
    this.setAttribute("ondragenter","PlacesMenuDNDController.onBookmarksMenuDragEnter(event); this.showPopup(this); this.toggleImgOpen();");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, BookmarksMenuDropHandler);");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, BookmarksMenuDropHandler);");
    // mouseovers
    this.setAttribute("onmouseover", "this.hideDropMarker(); this.toggleImgOpen();" );
    this.setAttribute("onmouseout", "this.toggleImgClosed();" );
    // button attributes
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081211.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    // make it part of the button group for menubar-menus
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    Clones the Bookmarks Menu
    It supports drag and drop and everything from the typical Bookmarks Menu.
    Note that if you can't drag into a folder that is on the typical Bookmarks Menu, then you won't be able
    to drag into the folder that is in this button either.
    Example: 'Most Visited' folder
  55. Bookmarks Toolbar Menu

    Code Tab

    /*Code*/

    Initialization Tab

    // Uncomment next line if you want to hide the Bookmarks Toolbar
    //document.getElementById('PersonalToolbar').setAttribute('collapsed','true');
    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='bookmarksToolbarFolderMenu',popupID="cb2mBar-"+menuName+num;
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      that.appendChild(mPop);
    }
    setTimeout(this.initBtn, 5000);
    // function to show popup
    this.showPopup = function(node) {
      var popup = document.getElementById(popupID);
      document.popupNode = node;
      popup.openPopup(node, "after_start", null, null, "popup", null, null);
    }
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 1);
      }
    }
    that.hideDropMarker();
    this.type="menu";
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("oncommand", "BookmarksEventHandler.onCommand(event);");
    // drag and drop functions
    this.setAttribute("ondragenter","PlacesMenuDNDController.onBookmarksMenuDragEnter(event); this.showPopup(this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, BookmarksMenuDropHandler);");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, BookmarksMenuDropHandler);");
    // mouseovers
    this.setAttribute("onmouseover", "this.hideDropMarker();");
    // button attributes
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081211.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    // make it part of the button group for menubar-menus
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    Clones the Bookmarks Toolbar into a menu.
    It supports drag and drop and everything from the typical Bookmarks toolbar.
    Note that if you can't drag into a folder that is on the toolbar, then you won't be able
    to drag into the folder that is in this button either.
    Example: 'Most Visited' folder
  56. Bookmarks Toolbar Menu

    Code Tab

    /*Code*/

    Initialization Tab

    // Uncomment next line if you want to hide the Bookmarks Toolbar
    //document.getElementById('PersonalToolbar').setAttribute('collapsed','true');
    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='bookmarksToolbarFolderMenu',popupID="cb2mBar-"+menuName+num;
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      that.appendChild(mPop);
    }
    setTimeout(this.initBtn, 5000);
    // function to show popup
    this.showPopup = function(node) {
      var popup = document.getElementById(popupID);
      document.popupNode = node;
      popup.openPopup(node, "after_start", null, null, "popup", null, null);
    }
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 1);
      }
    }
    that.hideDropMarker();
    this.type="menu";
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("oncommand", "BookmarksEventHandler.onCommand(event);");
    // drag and drop functions
    this.setAttribute("ondragenter","PlacesMenuDNDController.onBookmarksMenuDragEnter(event); this.showPopup(this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, BookmarksMenuDropHandler);");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, BookmarksMenuDropHandler);");
    // mouseovers
    this.setAttribute("onmouseover", "this.hideDropMarker();");
    // button attributes
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081211.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    // make it part of the button group for menubar-menus
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    Clones the Bookmarks Toolbar into a menu.
    It supports drag and drop and everything from the typical Bookmarks toolbar.
    Note that if you can't drag into a folder that is on the toolbar, then you won't be able
    to drag into the folder that is in this button either.
    Example: 'Most Visited' folder
  57. Bottom Panel

    Code Tab

    /*Code*/
    /* ***** BEGIN LICENSE BLOCK *****
     * Version: MPL 1.1/GPL 2.0/LGPL 2.1
     *
     * The contents of this file are subject to the Mozilla Public License Version
     * 1.1 (the "License"); you may not use this file except in compliance with
     * the License. You may obtain a copy of the License at
     * http://www.mozilla.org/MPL/
     *
     * Software distributed under the License is distributed on an "AS IS" basis,
     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     * for the specific language governing rights and limitations under the
     * License.
     *
     * The Original Code is Bottom Panel for Custom Buttons.
     *
     * The Initial Developer of the Original Code is LouCypher.
     * Portions created by the Initial Developer are Copyright (C) 2006
     * the Initial Developer. All Rights Reserved.
     *
     * Contributor(s) (alphabetical order):
     *  LouCypher <loucypher.moz@gmail.com>
     *
     * Alternatively, the contents of this file may be used under the terms of
     * either the GNU General Public License Version 2 or later (the "GPL"), or
     * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     * in which case the provisions of the GPL or the LGPL are applicable instead
     * of those above. If you wish to allow use of your version of this file only
     * under the terms of either the GPL or the LGPL, and not to allow others to
     * use your version of this file under the terms of the MPL, indicate your
     * decision by deleting the provisions above and replace them with the notice
     * and other provisions required by the GPL or the LGPL. If you do not delete
     * the provisions above, a recipient may use your version of this file under
     * the terms of any one of the MPL, the GPL or the LGPL.
     *
     * ***** END LICENSE BLOCK ***** */
    this.bottomPanel();
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.bottomPanel = function(aURL) {
      var prefBranch = "custombuttons.bottomPanel."
      if(!aURL && aURL != "") {
        try {
          aURL = gPrefService.getCharPref(prefBranch + "url");
        } catch(ex) {
          aURL = "";
        }
      }
      if(aURL == "") return;
      if(aURL == gURLBar.value && !aURL.match(/^\w+?\:/)) aURL = "http://" + aURL;
      var panelID = "bottom-panel";
      var gPanel = document.getElementById(panelID);
      var height;
      try {
        height = gPrefService.getIntPref(prefBranch + "height");
      } catch(ex) {
        height = 300;
      }
      if(gPanel) {
        var src = gPanel.firstChild.nextSibling.getAttribute("src");
        if(aURL != src) {
          gPanel.firstChild.nextSibling.setAttribute("src", aURL);
          //gPanel.firstChild.nextSibling.loadURI(aURL);
        } else {
          gPrefService.setIntPref(prefBranch + "height", gPanel.height);
          gPanel.parentNode.removeChild(gPanel.previousSibling);
          gPanel.parentNode.removeChild(gPanel);
        }
      } else {
        var appContent = document.getElementById("appcontent");
        var spl = appContent.appendChild(document.createElement("splitter"));
            spl.setAttribute("collapse", "after");
            spl.style.border = "none";
            spl.style.borderTop = "2px solid threedhighlight";
            spl.setAttribute("onclick", "this.setAttribute('state', '');");
        var box = appContent.appendChild(document.createElement("hbox"));
            box.id = panelID;
            box.height = height;
            box.orient = "vertical";
        var tbr = box.appendChild(document.createElement("toolbar"));
            tbr.setAttribute("fullscreentoolbar", true);
        var spr = tbr.appendChild(document.createElement("spacer"));
            spr.setAttribute("flex", 1);
        var btn = tbr.appendChild(document.createElement("toolbarbutton"));
            btn.style.listStyleImage = "url(chrome://global/skin/icons/Minimize.gif)";
            btn.minimize = function() {
              var gPanel = document.getElementById("bottom-panel");
              gPanel.previousSibling.setAttribute("state", "collapsed");
            }
            btn.setAttribute("oncommand", "this.minimize()");
        var btc = tbr.appendChild(document.createElement("toolbarbutton"));
            btc.className = "tabs-closebutton";
            btc.closePanel = function() {
              var gPanel = document.getElementById("bottom-panel");
              gPrefService.setIntPref(prefBranch + "height", gPanel.height);
              gPanel.parentNode.removeChild(gPanel.previousSibling);
              gPanel.parentNode.removeChild(gPanel);
            }
            btc.setAttribute("oncommand", "this.closePanel()");
        var ifr = box.appendChild(document.createElement("browser"));
            ifr.setAttribute("type", "content");
            ifr.setAttribute("flex", 1);
            ifr.setAttribute("src", aURL);
            ifr.setAttribute("tooltip", "aHTMLTooltip");
            ifr.setAttribute("onclick", "return contentAreaClick(event, true)");
            ifr.setAttribute("autocompletepopup", "PopupAutoComplete");
            ifr.setAttribute("contextmenu", "contentAreaContextMenu");
            ifr.setAttribute("contentcontextmenu", "contentAreaContextMenu");
      }
      gPrefService.setCharPref(prefBranch + "url", aURL);
    }  
    this.getBookmark = function() {
      var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
                              .getService(Components.interfaces.nsIXULAppInfo);
      var isFx2 = appInfo.version == "2.0";
      var url = "";
      var rv = isFx2 ? { urls: null, names: null } : { url: null };
      openDialog("chrome://browser/content/places/places.xul",
                 "", "modal, dialog=no, minimizable=no, centerscreen, resizable", rv);
      if (rv.urls && rv.names) url = rv.urls[0]
      else if (rv.url) {
        url = rv.url;
        if (url.indexOf("|") > 0)
          url = url.split("|")[0];
      }
      return url;
    }
    this.getFile = function() {
      try {
        const nsIFilePicker = Components.interfaces.nsIFilePicker;
        var fp = Components.classes['@mozilla.org/filepicker;1']
                    .createInstance(nsIFilePicker);
        fp.init(window, gNavigatorBundle.getString("openFile"),
                         nsIFilePicker.modeOpen);
        fp.appendFilters(nsIFilePicker.filterAll |
                         nsIFilePicker.filterText |
                         nsIFilePicker.filterImages |
                         nsIFilePicker.filterXML |
                         nsIFilePicker.filterHTML);
        if(fp.show() == nsIFilePicker.returnOK)
          return fp.fileURL.spec;
        else return "";
      } catch (ex) {
      }
    }
    this.popupShowing = function(aNode) {
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      if(pasteURL) aNode.lastChild.tooltipText = readFromClipboard();
      aNode.lastChild.setAttribute("disabled", !pasteURL ? true : false);
    }
    function addMenuitem(aLabel, aURL, aNode, aObjString) {
      var mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.setAttribute("label", aLabel);
      mItem.setAttribute("oncommand",
                         aObjString + ".bottomPanel('" + aURL + "');");
    }
    function addSeparator(aNode, aNum) {
      var separator = aNode.appendChild(document.createElement("menuseparator"));
      separator.id = "bottom-panel-button-separator" + aNum;
    }
    var mPopup = document.createElement("menupopup");
    mPopup.setAttribute("oncommand", "event.stopPropagation()");
    mPopup.setAttribute("onpopupshowing", "this.parentNode.popupShowing(this)");
    var smPopup = document.createElement("menupopup");
    smPopup.setAttribute("oncommand", "event.stopPropagation()");
    var subMenu = document.createElement("menu");
    subMenu.appendChild(smPopup);
    subMenu.setAttribute("label", "From Sidebar");
    var objString = "this.parentNode.parentNode.parentNode.parentNode";
    var viewSidebarMenu = document.getElementById("viewSidebarMenu");
    var sidebarItems = viewSidebarMenu.childNodes;
    for(var i = 0; i < sidebarItems.length; i++) {
      var sidebarItem = sidebarItems[i];
      if((sidebarItem.hasAttributes("sidebarurl") &&
          sidebarItem.getAttribute("sidebarurl") != "") &&
         (sidebarItem.hasAttributes("label") &&
          sidebarItem.getAttribute("label") != ""))
        addMenuitem(sidebarItem.getAttribute("label"),
                    sidebarItem.getAttribute("sidebarurl"),
                    smPopup, objString);
    }
    objString = "this.parentNode.parentNode";
    addMenuitem("about:config", "about:config", mPopup, objString);
    addMenuitem("Error Console", "chrome://global/content/console.xul", mPopup, objString);
    addMenuitem("Bookmarks Manager", "chrome://browser/content/places/places.xul", mPopup, objString);
    addMenuitem("Extensions Manager", "chrome://mozapps/content/extensions/extensions.xul?type=extensions", mPopup, objString);
    addMenuitem("Download Manager", "chrome://mozapps/content/downloads/downloads.xul", mPopup, objString);
    //DownTHEMall
    if (typeof DTA_ContextOverlay == "object")
      addMenuitem("dTa! Manager", "chrome://dta/content/dta/manager.xul", mPopup, objString);
    //Stylish
    if (typeof stylishCommon == "object") {
      if (typeof stylishCommonOverlay == "object") //if Stylish 0.5
        addMenuitem("Stylish Manager", "chrome://stylish/content/manage.xul", mPopup, objString);
      else
        addMenuitem("Stylish Manager", "chrome://stylish/content/stylish.xul", mPopup, objString);
    }
    //MR Tech Local Install - My Config
    if (typeof Local_Install == "object")
      addMenuitem("My Config", "chrome://local_install/content/infolister.xul", mPopup, objString);
    //QuickNote
    if (typeof QuickNote_openQuickNote == "function")
      addMenuitem("QuickNote", "chrome://quicknote/content/quicknote.xhtml", mPopup, objString);
    //ChromeList
    if (typeof startChromeEnumerator == "function")
      addMenuitem("Explore Chrome", "chrome://chromelist/content/chromelist.xul", mPopup, objString);
    //ChatZilla
    if (typeof toIRC == "function")
      addMenuitem("ChatZilla", "chrome://chatzilla/content/chatzilla.xul", mPopup, objString);
    addSeparator(mPopup, 0);
    var homePages = gHomeButton.getHomePage().split("|");
    var homePage = homePages[0];
    addMenuitem("Home Page", homePage, mPopup, objString);
    addMenuitem("Current Page", "' + content.location.href + '", mPopup, objString);
    addMenuitem("View Page Source", "view-source:' + content.location.href +'", mPopup, objString);
    addSeparator(mPopup, 1);
    mPopup.appendChild(subMenu);
    addMenuitem("From Location Bar", "' + gURLBar.value + '", mPopup, objString);
    addMenuitem("From Bookmarks", "' + this.parentNode.parentNode.getBookmark() + '", mPopup, objString);
    addMenuitem("From File", "' + this.parentNode.parentNode.getFile() + '", mPopup, objString);
    addMenuitem("From Clipboard", "' + readFromClipboard() + '", mPopup, objString);
    this.appendChild(mPopup);
    this.type = "menu-button";
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bottom-panel-menu-button.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  58. Bottom Panel Browser

    Code Tab

    /*Code*/
    

    Initialization Tab

    this.leftclick = function(evt){
    	var url = "data:text/html;base64,PGh0bWw+DQo8dGl0bGU+Ym90dG9tIHBhbmVsPC90aXRsZT4NCjxzdHlsZT4NCioge21hcmdpbjowcHg7cGFkZGluZzowcHg7fQ0KPC9zdHlsZT4NCjxzY3JpcHQ+DQpmdW5jdGlvbiBsb2FkcGFnZSgpIHsNCmRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdpZnJhbWUnKVswXS5zcmM9ZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2lucHV0JylbMF0udmFsdWU7DQp9DQo8L3NjcmlwdD4NCjxzcGFuIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOi1tb3otZGlhbG9nO3Bvc2l0aW9uOmZpeGVkO3RvcDowcHg7bGVmdDowcHg7cGFkZGluZy10b3A7M3B4O3BhZGRpbmctYm90dG9uOjNweDt3aWR0aDoxMDAlOyI+PGlucHV0IHN0eWxlPSJ3aWR0aDo5MCU7IiB0eXBlPSJ0ZXh0IiB2YWx1ZT0iaHR0cDovLyIgb25rZXlwcmVzcz0iaWYgKGV2ZW50LndoaWNoPT0xMyl7bG9hZHBhZ2UoKX0iIC8+PGlucHV0IHR5cGU9ImJ1dHRvbiIgb25jbGljaz0ibG9hZHBhZ2UoKSJzdHlsZT0id2lkdGg6MTAlIiB2YWx1ZT0iR08hIi8+PC9zcGFuPg0KPGlmcmFtZSBzdHlsZT0ibWFyZ2luLWJvdHRvbTotMjVweDtib3JkZXItd2lkdGg6MjVweDtib3JkZXItY29sb3I6bW96LWRpYWxvZztib3JkZXItc3R5bGU6c29saWQ7Ym9yZGVyLWxlZnQ6bm9uZTtib3JkZXItcmlnaHQ6bm9uZTtib3JkZXItYm90dG9tOm5vbmU7YmFja2dyb3VuZC1jb2xvcjotbW96LWRpYWxvZztoZWlnaHQ6MTAwJTt3aWR0aDoxMDAlOyI+VGhlcmUgc2hvdWxkIGJlIGFuIGlmcm1hZSBoZXJlIG1heWJlIHlvdSBoYXZlIHRoZW0gb2ZmLCBsb2w8L2lmcmFtZT4NCjwvaHRtbD4=";
    	this.bottomPanel(url);
    }
    this.midclick = function(evt){
    	var url = window._content.location.href;
    	this.bottomPanel(url);
    }
    /* -------------------------------------------------------------
         Bottom Panel Function
         by LouCypher (aka Zoolcar9)
         Opens URL in a bottom panel
       ------------------------------------------------------------- */
    this.bottomPanel = function(url, contextmenu) {
      var panelID = "bottom-panel";
      var gPanel = document.getElementById(panelID);
      if(gPanel) {
        if(gPanel.firstChild.getAttribute("src").indexOf(url) == -1) {
          gPanel.firstChild.setAttribute("src", url);
          if(contextmenu) gPanel.setAttribute("contextmenu", contextmenu);
          else gPanel.removeAttribute("contextmenu");
        } else {
          gPanel.parentNode.removeChild(gPanel.previousSibling);
          gPanel.parentNode.removeChild(gPanel);
        }
      } else {
        var tbb = document.createElement("toolbarbutton");
            tbb.className = "tabs-closebutton";
            tbb.style.cursor = "pointer";
            tbb.setAttribute("oncommand",
                "this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); " +
                "this.parentNode.parentNode.removeChild(this.parentNode)");
        var spr = document.createElement("spacer");
            spr.setAttribute("flex", 1);
        var spl = document.createElement("splitter");
            spl.height = "28px";
            spl.appendChild(spr);
            spl.appendChild(tbb);
        var ifr = document.createElement("iframe");
            ifr.setAttribute("flex", 1);
            ifr.setAttribute("src", url);
        var box = document.createElement("box");
            box.id = panelID;
            box.height = "300px";
            box.appendChild(ifr);
        if(contextmenu) box.setAttribute("contextmenu", contextmenu);
        gBrowser.parentNode.appendChild(spl);
        gBrowser.parentNode.appendChild(box);
      }
    }  
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bottom-panel-browser.html');

    Help Tab

  59. Browse Folder

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.openFolder = function(aEvent) {
      var nsIFilePicker = Components.interfaces.nsIFilePicker;
      var dp = Components.classes["@mozilla.org/filepicker;1"]
                .createInstance(nsIFilePicker);
      dp.init(window, "", dp.modeGetFolder);
      if(dp.show() == dp.returnCancel) return;
      openUILink(dp.fileURL.spec, aEvent, false, true);
    }
    this.checkForMiddleClick = function(aNode, aEvent) {
      if(aEvent.button == 1) {
        var fn = new Function("event", "this.openFolder(event)");
        fn.call(aNode, aEvent);
      }
      else if (aEvent.button == 0) {
        this.openFolder(aEvent);
      }
    }
    this.setAttribute("onclick", "this.checkForMiddleClick(this, event)");
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','Lou Cypher,SCClockDr');
    this.setAttribute('version','20080216.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browse-folder.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

  60. Browser links

    Code Tab

    this.value="chrome://browser/content/preferences/preferences.xul";
    gBrowser.selectedTab = gBrowser.addTab(event.target.value);

    Initialization Tab

    var apps,srcUrl,MItem,mPop;
    srcUrl='http://www.google.com';
    //------menu items--------
    apps=new Array;
    apps.push(['Java Console','chrome://global/content/console.xul']);
    apps.push(['Configuration Settings','about:config']);
    apps.push(['DOM Inspector','chrome://inspector/content/inspector.xul']);
    apps.push(['Addons','chrome://mozapps/content/extensions/extensions.xul']);
    apps.push(['ChromEdit Plus SE','chrome://chromedit/content/chromedit.xhtml']);
    //------/menu items-------
    MItem=function(label,path){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      mItem.id = path;
      mItem.value = path;
      mItem.tooltipText = path;
      return mItem;
    }
    this.onMouseOver = function() {
      var homePage = gHomeButton.getHomePage();
      homePage = homePage.replace(/\|/g,', ');
      this.tooltipText = "Browser links";
    }
    //this.orient="vertical";
    mPop=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mPop.appendChild(document.createElement('menuseparator'));
     }else{
      if (!apps[i] [2]) apps[i] [2]=srcUrl;
      mPop.appendChild(MItem(apps[i] [0],apps[i] [1]));
     }
    }
    this.setAttribute("onmouseover", "this.onMouseOver()");
    this.appendChild(mPop);
    this.type = "menu-button";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/link-menus.html');

    Help Tab

  61. Browser Manipulator Menu-button

    Code Tab

    /*Code*/

    Initialization Tab

    // START CHECK FOR CUSTOMBUTTONS VERSION
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    // END CHECK FOR CUSTOMBUTTONS VERSION
    var cb=custombuttons,self=this,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    function l(str) {
      self.properties = {
        en_US:{             // English US translation by nicholas
          Label:              'Browser Manipulator Menu-button',
          Minimize_1:         'Minimize',
          MinimizeToTray_3:   '%1 to Tray',
          Maximize:           'Maximize',
          RestoreDown:        'Restore Down',
          Toggle_2:           'Toggle',
          ToggleChrome:       '%2 Chrome',
          ToggleFullscreen:   '%2 Fullscreen',
          Close:              'Close',
          Quit:               'Quit',
          Restart:            'Restart',
          Requirement:        'You must have "%3" installed to use this option',
          Chromeless:         'Chromeless',
          Left:               'L',
          Middle:             'M',
          Right:              'R'
        },
        ja:{               // Japanese translation by nicholas
          Label:              'Browser Manipulator Menu-button',
          Minimize_1:         '最小化',
          MinimizeToTray_3:   'トレイに%1',
          Maximize:           '最大化',
          RestoreDown:        'ウィンドウを表示',
          Toggle_2:           'ーム切り替え',
          ToggleChrome:       'ウィンドウクロ%1',
          ToggleFullscreen:   '全画面表示%1',
          Close:              '閉じる',
          Quit:               '終了',
          Restart:            'を再起動',
          Requirement:        'You must have "%1" installed to use this option',
          Chromeless:         'クローム無し',
          Left:               '左',
          Middle:             '中',
          Right:              '右'
        },
        nl:{                // Dutch translation by markh
          Label:              'Browser Manipulator menuknop',
          Minimize_1:         'Minimaliseren',
          MinimizeToTray_3:   '%1 naar snelstartbalk',
          Maximize:           'Maximaliseren',
          RestoreDown:        'Terugzetten',
          Toggle_2:           'Wisselen',
          ToggleChrome:       '%1 chrome',
          ToggleFullscreen:   '%1 volledig scherm',
          Close:              'Sluiten',
          Quit:               'Stoppen',
          Restart:            'Herstarten',
          Requirement:        'U dient "%1" geïnstalleerd te hebben om deze optie te gebruiken',
          Chromeless:         'Zonder chrome',
          Left:               'L',
          Middle:             'M',
          Right:              'R'
        },
        fr:{                // French translation by Goofy
           Label:              'Bouton de menu de Browser Manipulator',
           Minimize_1:         'Réduire',
           MinimizeToTray_3:   '%1 vers la barre de tâches',
           Maximize:           'Agrandir',
           RestoreDown:        'Restaurer',
           Toggle_2:           'Activer/désactiver',
           ToggleChrome:       '%1 la mise en page',
           ToggleFullscreen:   '%1 le mode plein écran',
           Close:              'Fermer',
           Quit:               'Quitter',
           Restart:            'Redémarrer',
           Requirement:        'Pour utiliser cette option "%1" doit être installé',
           Chromeless:         'Sans mise en page',
           Left:               'G',
           Middle:             'M',
           Right:              'D'
        },
        es_ES:{             // Spanish (Spain) translation by nicholas
           Label:              'Botón de menú de Browser Manipulator',
           Minimize_1:         'Minimizar',
           MinimizeToTray_3:   '%1 al área de notificación',
           Maximize:           'Maximizar',
           RestoreDown:        'Restaurar',
           Toggle_2:           'Alternar',
           ToggleChrome:       'Conmutar marco ventana',
           ToggleFullscreen:   'Pantalla completa',
           Close:              'Cerrar',
           Quit:               'Dejar',
           Restart:            'Reiniciar',
           Requirement:        'Usted debe tener "% 1" instalado para utilizar esta opción',
           Chromeless:         'Marco ventana',
           Left:               'I',
           Middle:             'M',
           Right:              'D'
        },
        es_AR:{             // Spanish (Argentina) translation by nicholas
           Label:              'Botón de menú de Browser Manipulator',
           Minimize_1:         'Minimizar',
           MinimizeToTray_3:   '%1 al área de notificación',
           Maximize:           'Maximizar',
           RestoreDown:        'Restaurar',
           Toggle_2:           'Alternar',
           ToggleChrome:       'Conmutar marco ventana',
           ToggleFullscreen:   'Pantalla completa',
           Close:              'Cerrar',
           Quit:               'Dejar',
           Restart:            'Reiniciar',
           Requirement:        'Usted debe tener "% 1" instalado para utilizar esta opción',
           Chromeless:         'Marco ventana',
           Left:               'I',
           Middle:             'M',
           Right:              'D'
        }
      };
      var tstr = cb.getLocalString(self, str);
      // Operations to handle replacements
      if (tstr.match(/[%]\w{1}/g)) {
        for(prop in self.properties[lang]) {
          if ((prop.match(/[_]\w{1}$/)) && ((prop.substr(prop.lastIndexOf("_")+1)) == (tstr.substring(tstr.indexOf("%")+1, tstr.indexOf("%")+2)))) {
            var tok = tstr.substring(tstr.indexOf("%"), tstr.indexOf("%")+2);
            tstr = tstr.replace(tok, l(prop));
          }
        }
      }
      return tstr;
    }
    var widthPref = "800";
    var heightPref = "800";
    function hideChrome() {
    var mainWindow = document.getElementById('main-window');
      if (navigator.platform == 'Win32') {
        window.moveTo(0,0);
        mainWindow.setAttribute('hidechrome','true');
        // preserve small area for taskbar to appear
        window.resizeTo(screen.availWidth-2, screen.availHeight);
      } else {
        mainWindow.setAttribute('hidechrome','true');
        window.moveTo(screen.availLeft, screen.availTop);
        window.resizeTo(screen.availWidth, screen.availHeight);
        document.getAnonymousElementByAttribute(document.getElementById("status-bar"), "class", "statusbar-resizerpanel").setAttribute("hidden", "true");
      }
    }
    // UNCOMMENT THE NEXT LINE TO START BROWSER CHROMELESS
    // hideChrome();
    // START ACTUAL FUNCTIONS TO BE PERFORMED ON CLICKS
      this.doLeft = function() {
        window.minimize();
      }
      this.doMid = function() {
      var mtt = custombuttons.isPref('extensions.minimizetotray.always');
      if (mtt==true) {
          window.extensions.mook.minimizetotray.minimizeWindow();
        } else {
          var sizemode = document.documentElement.getAttribute('sizemode');
          sizemode == 'maximized' ? window.restore() : window.maximize();   
        }
      }
    // END ACTUAL FUNCTIONS TO BE PERFORMED ON CLICKS
    // START MOUSECLICK HANDLERS
      this.leftclick = function(evt) {
        switch(evt.eventPhase) {
          case 0:
          break;
          case 2:
            if (evt.originalTarget.id == "") this.doLeft(); // fires in FF3
          break;
          case 3:                                            // Won't fire in FF3 see case 2:
            this.doLeft();
          break;
          default:
        }
      };
      this.cleftclick = function(evt) {
        this.doMid();
      };
      this.midclick = function(evt) {
        this.doMid();
      };
      this.rightclick = function(evt) {
        window.close();
      };
    // END MOUSECLICK HANDLERS
    // START ADDMENUITEM FUNCTION
      function addMenuitem(aLabel, aCommand, aNode, aObjString, aTooltipText) {
        var mItem = aNode.appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", aLabel);
        mItem.setAttribute("oncommand", aCommand);
        mItem.setAttribute("tooltiptext", aLabel);
      }
    // END ADDMENUITEM FUNCTION
    // START ADDSEPARATOR FUNCTION
      function addSeparator(aNode, aNum) {
        var separator = aNode.appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + aNum;
      }
    // END SEPARATOR FUNCTION
    // START VARS/FUNCTIONS TO BE PERFORMED WHEN CHOOSING MENUITEMS
      var mainWindow = "document.getElementById('main-window')";
      var isFullScreen = mainWindow + ".getAttribute('hidechrome')";
      var sChrome = "\n" +
    		"function showChrome() {\n" +
    		"  if (navigator.platform == 'Win32') {\n" +
    		"    " + mainWindow + ".setAttribute('hidechrome','false');\n" +
    		"    window.resizeTo(" + widthPref + ", " + heightPref + ");\n" +
    		"  } else { \n" +
    		"    " + mainWindow + ".setAttribute('hidechrome','false');\n" +
                    "    window.resizeTo(" + widthPref + ", " + heightPref + ");\n" +
    		"  }\n" +
    		"}\n" +
    		"\n";
      var hChrome = "\n" +
    		"function hideChrome() {\n" +
    		"  if (navigator.platform == 'Win32') {\n" +
    		"    window.moveTo(0,0);\n" +
    		"    " + mainWindow + ".setAttribute('hidechrome','true');\n" +
    		"    // preserve small area for taskbar to appear\n" +
    		"    window.resizeTo(screen.availWidth, screen.availHeight-2);\n" +
    		"  } else {\n" +
    		"    " + mainWindow + ".setAttribute('hidechrome','true');\n" +
    		"    window.moveTo(0,0);\n" +
    		"    window.resizeTo(screen.availWidth, screen.availHeight-2);\n" +
    		"  }\n" +
    		"}\n" +
    		"\n";
      var tChrome = "\n" +
    		"function toggleChrome() {\n" +
    		"  var isFullScreen = " + mainWindow + ".getAttribute('hidechrome');\n" +
    		"  if (" + isFullScreen + " == '' || " + isFullScreen + " == 'false') {\n" +
    		"    hideChrome();\n" +
    		"  } else {\n" +
    		"    showChrome();\n" +
    		"  }\n" +
    		"}\n" +
    		"\n";
      var maxResize = "\n" +
    		"document.getElementById('main-window').setAttribute('hidechrome','false');\n" +
    		"var sizemode = document.documentElement.getAttribute('sizemode');\n" +
    		"sizemode == 'maximized' ? window.resizeTo(" + widthPref + "," + heightPref + " ) : window.maximize();\n";
      // START MAXRES
      var maxres =
        "if (" + isFullScreen + " == 'true') {\n" + sChrome +
        "  showChrome();\n" +
        "  window.maximize();\n" +
        "} else {\n" +
        "  document.getElementById('main-window').setAttribute('hidechrome','false');\n" + 
        maxResize +
        "}\n";
      // END MAXRES
      // START RESTORE
      var restore =
        isFullScreen + ";" +
        sChrome +
        "  showChrome();\n" +
        "  window.resizeTo(" + widthPref + "," + heightPref + " );\n";
      // END RESTORE
      // START CHROME
      var chrome = "\n" +
        hChrome +
        sChrome +
        tChrome +
        "  toggleChrome();\n";
      // END CHROME
      // START FULLSCREEN
      var fullscreen = 
        "document.getElementById('main-window').setAttribute('hidechrome','false');\n" +
        "  window.resizeTo(" + widthPref + "," + heightPref + " );\n" + // NEEDED BECAUSE OF BUG: 423641
        "BrowserFullScreen();\n" +
        "resbar = this.parentNode.parentNode.parentNode.id;\n" +
        "if(resbar == 'nav-bar') document.getElementById('window-controls').setAttribute('hidden','true');"
      // END FULLSCREEN
      // START RESTART
      var restart = 
        "if (gBrowser.warnAboutClosingTabs(\"All\")) { // Idea from _pi Thanks!\n" +
        "  var appStartup = Components.classes[\"@mozilla.org/toolkit/app-startup;1\"].getService(Components.interfaces.nsIAppStartup);\n" +
        "  appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);\n" +
        "} // End if (gBrowser.warnAboutClosingTabs(\"All\"))\n";
      // END RESTART
    // END VARS/FUNCTIONS TO BE PERFORMED WHEN CHOOSING MENUITEMS
    // START CREATE POPUP MENU AND ADD THE MENUITEMS
    var mPopup = document.createElement("menupopup");
      mPopup.setAttribute("onpopupshowing", "this.parentNode.popupShowing(this); event.stopPropagation();");
    var objString = "this.parentNode.parentNode.parentNode.parentNode";
      objString = "this.parentNode.parentNode";
        addMenuitem(l("Minimize_1"), "window.minimize();", mPopup, objString);
        addMenuitem(l("MinimizeToTray_3"), "window.extensions.mook.minimizetotray.minimizeWindow();", mPopup, objString);
        addSeparator(mPopup, 0);
        addMenuitem(l("Maximize"), maxres, mPopup, objString);
        addMenuitem(l("RestoreDown"), restore, mPopup, objString);
        addMenuitem(l("ToggleChrome"), chrome, mPopup, objString);
        addMenuitem(l("ToggleFullscreen"), fullscreen, mPopup, objString);
        addSeparator(mPopup, 1);
        addMenuitem(l("Close"), "window.close();", mPopup, objString);
        addMenuitem(l("Quit"), "goQuitApplication();", mPopup, objString);
        addMenuitem(l("Restart"), restart, mPopup, objString);
    // END CREATE POPUP MENU AND ADD THE MENUITEMS
    // START ALTER MENUITEMS ONPOPUP OF MENU, DEPENDENT ON CERTAIN CONDITIONS
      this.popupShowing = function(aNode) {
        // START MINIMIZE TO TRAY CHECK
        var mtt = custombuttons.isPref('extensions.minimizetotray.always');
        if (mtt==false) {
          aNode.firstChild.nextSibling.setAttribute("disabled", true);
          aNode.firstChild.nextSibling.tooltipText = l("Requirement");
        }
        // END MINIMIZE TO TRAY CHECK
        // START CHECK FOR STATE OF BROWSER MAXIMIZE/RESTORED DOWN
        var sizemode = document.documentElement.getAttribute('sizemode');
        if (sizemode == 'maximized') {
          aNode.firstChild.nextSibling.nextSibling.nextSibling.setAttribute("label", l("RestoreDown"));
        }
        if (sizemode != 'maximized') {
          aNode.firstChild.nextSibling.nextSibling.nextSibling.setAttribute("label", l("Maximize"));
        }
        // END CHECK FOR STATE OF BROWSER MAXIMIZE/RESTORED DOWN
        // START CHECK FOR STATE OF BROWSER CHROMELESS/NORMAL
        var mainWindow = document.getElementById("main-window");
        var isFullScreen = mainWindow.getAttribute('hidechrome');
        // BROWSER IS CHROMELESS, SHOW RESTORE OPTION
        if(isFullScreen == "true") { 
          aNode.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.setAttribute("hidden", "false");
          aNode.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.setAttribute("hidden", "true");
        }
        // BROWSER IS NORMAL, HIDE RESTORE OPTION
        if(isFullScreen != "true") {
          aNode.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.setAttribute("hidden", "true");
          aNode.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.setAttribute("hidden", "false");
          aNode.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.setAttribute("label", "Chromeless");
        }
        // END CHECK FOR STATE OF BROWSER CHROMELESS/NORMAL
      }
    // END ALTER MENUITEMS ONPOPUP OF MENU, DEPENDENT ON CERTAIN CONDITIONS
    // START ALTER TOOLTIP TEXT, DEPENDENT ON CONDITIONS
      this.hover = function() {
        var sizemode = document.documentElement.getAttribute('sizemode');
        if (sizemode == 'maximized') var mr = l("RestoreDown");
        if (sizemode != 'maximized') var mr = l("Maximize");
        var mtt = custombuttons.isPref('extensions.minimizetotray.always');
        if (mtt == true) var middleFunction = l("MinimizeToTray_3");
        if (!mtt == true) var middleFunction = mr;
        this.tooltipText = l("Label")+"\n"+l("Left")+": "+l("Minimize_1")+"\n"+l("Middle")+": "+middleFunction+"\n"+l("Right")+": "+l("Close");
      }
    // END ALTER TOOLTIP TEXT, DEPENDENT ON CONDITIONS
    this.dir = "rtl"; // MAKES MENU-BUTTON DISPLAY RIGHT TO LEFT
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event); this.hover();' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    mPopup.setAttribute("oncommand", "event.stopPropagation()");
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.appendChild(mPopup); // ADD POPUP TO MENU OF MENUBUTTON
    this.type = "menu-button";
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20090407.00');                                                 	// Stores Version.
    this.setAttribute("dependency",'FF 2.0.*,FL 1.0*,TB 2.0*,CB 2.0.7.5*' +
    		  'Minimize to Tray');								// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-manipulator-menu-button.html');
    

    Help Tab

    ********************************************************************        
     Be sure to set your preferred browser restore size
     in the initialization tab! (widthPref & heightPref)
     This Button has a number of options for         
     minimizing maximizing restoring and shutting         
     down the browser. 
     * note you may set the browser to start chromeless 
     by default; the option is in the initialization code tab      
    ********************************************************************        
     Directly Clicking on the Button does the following:        
         L = Minimizes         
         M or L+CTRL = Minimize to Tray (if "Minimize to Tray" is installed)         
                                  = Maximizes/Restore Down (if "Minimize to Tray" is not installed)         
         R = Closes Window        
         SHIFT+Click = Custom Buttons Context Menu         
    ********************************************************************        
     The Menu has the following options:         
         Minimize         
         Minimize to Tray (if "Minimize to Tray" is installed)         
         Maximize/Restore         Down
         Chromeless         
         Toggle Fullscreen         
         Close Window         
         Quit Firefox         
         Restart Firefox
    
  62. Button Archive ver 4.09 TIDY

    Code Tab

    /*Code*/
    // See the initialise tab for user options
    /* Using the Button Archive List button
       ====================================
        Click on any item to toggle it from:-
        Show button (green background)
        to
        Don't show button (red background)
        Once done, click on the "See final list" button at the 
        bottom of the menu to check your list before posting.
        In the (final) check list popup you can return to the edit list or
        copy your final list to the clipboard using the buttons at
        the bottom of the list.
    */
      this.togglecheck(event);
    

    Initialization Tab

    /*Initialization code*/
    /* +================  Start of user options ================+ */
    //
    // If all your buttons are not listed on startup you may need more than a four
    // second delay before the button list is built. Try adding a couple of seconds.
    var mywait = 4;
    //
    // When checking for possible duplicate button versions the button
    // looks at the first nn% of button names. (see "Help" tab for more)
    this.dupcheckpercent = 70;
    //
    // Menus should automatically refresh after being clicked on. If they don't
    // and you have to click the archive button again to see a menu try 
    // increasing the time. First to any small non-zero single digit, and if that
    // doesn't work start delay from 100 to perhaps 250 or even 500
    var showmenudelay = 0
    //
    // You can see the icons at real size or at a standard size...
    var realsize = true; // set to false for a standard 16x16
    //
    // You can see either colours, or ticks, or both
    // just set one or both to true or false
    var ticks = true;
    var colours = true;
    /* +================  End of user options ================+ */
    //this.setAttribute( 'onclick', 'gQuot( event, this )' ); 
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important;");
    var nextlist = "data:image/gif;base64,R0lGODlhGAAYAIcAAAF4tAN5tQR5tQR6tQV6tQd8tgh8tgl8twt+twx+tw1+txCAuBCAuRGBuRKBuRKBuhiEuxiFuxmFvBqFvByGvB2HvSOKviOKvySKvieMvyOMwCuOwSuQwy2Qwi6QwTCRwzKTxTSUxTeVxTaXyDuXxTqYxzyYxz2Yxj+Zxj6ayEWdykadyEedyUaey0eeykieyUify0qfyU6hy0yhzEuk0F2pz1ao0Vup0Vuq0luq01yu1mGr0GGt1GWt0Wau02Wv1Wqv02Sx12qw02qx1mqy12yx022z1m2z126012643Xa32nm623q62nq93n683H+83H7C5X/D5fpU+IC72YC93IG93YjA3InA3IvB3YvE343C3Y/D3pDE3pPF35PG34DD5YHD5YLD5YLE5YPE5YPF5YXD4oTF5YXF5YXG5obG5YfG5YbG5ojG5YjH5YnH5YjH54nH5orH5YrH5ovI5ozI5o3J547J54/J547K54/K543K6I7K6I/K6JDJ55DK55HK55HL55LK55LL55XI4JfI4JTL55XM6JbM6JfN6JnN55jN6JnN6JjO6JnO6JrO6JvP6JvP6ZzP6Z3P6ZrQ6pzQ6pzQ657Q6Z/Q6aLO46fQ5aDR6qLR6qPS6qLT7KTS6aTS6qXS6qXT6qbV7KrS5q7U56jU6qrV66zW7K7W7K7X7K/X7K/a7rDU57DV6LDX7L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kAhAlRAADs=";
    var clipcopy = "data:image/gif;base64,R0lGODlhFAAXAIcAAAAaAAAqAAAsAAAxAAA8AABAAABEAABFBABIAABRAABZAABjAABwAAB3AAB3ORJTfiFUfzlZbjldcXtiMkBfc0tidmVwfnNqYXlwZ3pxZwBPjFZrgVZ4jVl4j116knJ/iwClOwiLWACgSC2qV0e3clq4dV+5eXOLoneQo2/BkXfrk41kNbd1L4x4T4l3UI12UI54UpR0TPpU+JiDYqqHWbaAWbiBXqONc7WEareNfLKTa7qQfL+desyLaMyUeIaKjoyIgoiMjZGMi5OVl5GUmJianImsv5ugqq+ZgbKMh7SNiraegLijgr2mh7ihjrikjb6ukaKioKKioqKlp6Skpaikpamppaewq7u7vbu8voyzxpy1xZ25y5271KW9zZztl43/pp/7qrjAurrCvKnpnLjT5Lz8wsCagsKgi8KgjMWvnsyrm82snMuxj8KxmsSznMqwkcixlcuxmMqxnc20ms20ndqoiNqxh96yjtW4nM6xoM+yo821os+2pc+4ps+6qNC3qNG5ptK6qdK6rdS6q9m6pd++oOKxjuO4kPmoh/+zm+C/oeO/oPG7rdHAjsDEvs3JsdHEo9PEq9XGrtbDuNHIsdXLtNXMtN/AsdjMtd/Jtt3Sut/Tv9zUvv/Knf/NneLCpeHIp/LDq8bEx8TU3szR0NjUwdzYxNzaydDU0srX8NXh5t/j4d7t69zn8uXNxevPwODWxeHZx+DaxOXbyubfz+nQyOnVyu3Vyu/Xzube2e7X0f/LwP/Pwv/MxPHXzv/V1ebc4uXg0OPh3ujg0+ji0ejn2u3j2u7s2//qy+Xm4ubm5Ojs5e3r5O7s5+no6O7t6u7u7Ovw6O7w6e7w7O7y7/Dv7f/q5v/l//nv8PX15/Lx6vHw7Pfz7/T07vH/7vT57fP18Pfz8vT08PT28fb3+fH/8PT48ff/+/nz8Pj28Pj39P/x8v/z+P/z/f/3//j48vr59Pv98/v+9v358v/69//88v/4+f/7/f/9+f//+f//+/3////8/v///f/+/yH5BAMAADIALAAAAAAUABcAAAj/AGU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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAP8ALAAAAAAKAAoAAAhRAHEIHEgQhwYRA01caCCwgYQROFBgWIBBYAcGEDxQUIDhhEAWHA4EGFDB40AQBQAI+ECQRIQDBgg8QCjwQoIKIS4ggAARBwYOHlVoSJChoNGAADs=";
    var limit=10;
    var mPop;
    var seePop;
    var alertstring = "";
    var btn = "";
    var btnid = "";
    var btnimage = "";
    var btntip = "";
    var button_count;
    var btnhomepage = "";
    var buttonhead = "";
    var cb_count = 0;
    var cb_total = 0;
    var cbparent = "";
    var checkdata = "";
    var cliphead = "";
    var clipreport = "";
    var dontpush = false;
    var hidepadding = "#ffffff";
    var idx = 0;
    var indexstring = "";
    var itemcolour = "";
    var itemamber = "#e6dd76";
    var itemgreen = "#87a705"
    var itemred = "#f5cbcb";
    //var itemgreen = "#CBCDB4"
    //var itemred = "#E2E2DB";
    var itemlight = "";
    var itembrt = 0.99;
    var itemmed = 0.75; // .75
    var itemdim = 0.50; // .5
    var listcomplete = false;
    var makechange = false;
    var mybuttons;
    var mylabel = "";
    var name = "";
    var namecrop = "";
    var nameLC = "";
    var ontb = "";
    var rExp = "";
    var testreport = "";
    var teststr = "";
    var whilecount = 0;
    //imagecheck vars
    var imgstr = "";
    var chopstr = "";
    var mywidth = 0;
    var menupad = "";
    //use . _ l j at menupadarry[0][required pad width] to make the padding
    // l=2px j=3px .=4px _=6px
    var menupadarray = new Array();
    menupadarray.push(["","","l","j",".","jl","_",".j","..","jjj","._","..j","...",".j_","._.","...j",".__","._.j","___",".__j","._._",".j.j.j",".___","._._j","____","___.j","._.__"]);
    var mythis = this.getAttribute("id");
    mythis = document.getElementById(mythis);
    mywait = mywait * 1000;
    this.setAttribute("mylistdone", "false");
    mythis.setAttribute("seePopvisible", "false");
    this.setAttribute("base64missing", "false");
    this.tooltipText = "Button Archive List";
    this.image = listred;
    var btnarray = new Array();
    var cliparray = new Array();
        let nItem = function(label,value,name,img,btntip,namecrop,ontb,btn)
        {
          var mItem=document.createElement('menuitem');
          mItem.setAttribute('label',label);  // namecrop);
          mItem.value = value;
          mItem.tooltipText = "ID = " + btn + "    " + name;
          mItem.setAttribute('class','menuitem-iconic');
          mItem.setAttribute('image',img);
          mItem.setAttribute('name',name);
          return mItem;
        }
    /* +==================================================================
            L I S T   A L E R T   F U N C T I O N
       ==================================================================+ */
    mythis.listalert = function(evt)
    {
      // make the menupopup
       if(this.getAttribute("mylistdone") == "false")
       {
        mPop=document.createElement('menupopup');
        mPop.maxHeight = 400; // screen.availHeight - 50;
        mPop.maxWidth = 250;
        // end of make menupopup
      // reset btn array and cb_count
        btnarray = new Array();
        cb_count = 0;
        cb_total = 0;
      //  Obtain list of available buttons
        var buttons = document.getElementsByTagName("toolbarbutton");
        button_count = buttons.length;
      //  For each button find name and id#. 
      var i = 0;  
      for ( i = 1;  i < button_count;  i++  )
      {
        mybuttons = buttons[i];
        btnid = mybuttons.getAttribute("id");
        // Do a test for "custombuttons-buttonxxx"         
        // IF this Button is custom collect its details
        rExp = /custombuttons-button/;
        if (rExp.test(btnid)) // Our kind of custom button (thanks SCClockDr)
        {
          name = mybuttons.getAttribute("label");
          cb_total++ // full count of buttons
          // get the toolbar that the button is on
          ontb = mybuttons.parentNode.id;
          // cut for digits only
          btn = custombuttons.getNumber(btnid); // (thanks SCClockDr)
          btntip = btn
          // show button icons 
            btnimage = mybuttons.getAttribute("image");
            checkdata = btnimage.substring(0,8);
          // check to see if it is base 64
        this.setAttribute("base64missing", "false"); 
        var passimage = true ;
        // set up for alert if not a base64 image
        rExp = /base64/;
        if (!rExp.test(btnimage)) // file on local computer
        {
          passimage = false;
        }
        // reset to allow for xbitmaps such as the clock button
        rExp = /xbitmap/;
        if (rExp.test(btnimage))
        {
          passimage = true;
        }    
        if(passimage == false)
        {
              alertstring = "";
              alertstring = "This button image is a local file on your computer.\n\n";
              alertstring += "ID = " + btn + " . . . ";
              alertstring += name + "\n\n";
              alertstring += "On toolbar:- " + '"' + ontb + '"' + "\n\n";
              alertstring += "Please edit the button and click on the ";
              alertstring += "->Base64 button to the right of the image box \n";
              alertstring += "and then click on " + '"' + "OK" + '"' + ". \n\n";
              alertstring += "Then click this button again.\n\n";
              alertstring += "SEE the HELP tab for why you need to do this.";
              var mytitle = "Button Archive List - missing =>base64";
              var Msg = createMsg(mytitle);
              Msg.aMsg(alertstring);
              //alert(" " + alertstring);
              this.setAttribute("base64missing", "true");
              return;
        }
        // call the imagecheck function to create padding
        // for the various image types and sizes
        if(passimage == true)
        {
          imagecheck();
    /*
          rExp = /x-icon;base64/;
          if (rExp.test(btnimage)) // it's an icon
          {
            teststr += btnimage.substring(25,85) + " " + mywidth + " " + name + "\n";
          }
    */
          // assume a nominal max image width is 32 and desired space = 38
          // get the difference and create a pad string with . and _ and j
          // which are four and six and three pixels wide
          tmp = 38 - mywidth;
          // if no width then image type not covered
          if(mywidth == 0)
          {
            tmp = 4;
          }
          // correct for images larger than 38
          if(tmp < 4)
          {
            tmp = 4;
          }
          if(realsize == false)
          {
            tmp = 10;
          }
          menupad = menupadarray[0][tmp];
          // 
          //alert("name = " + name + "\n\nmywidth = " + mywidth);
          //return;
        }
          // manipulate name for sorting and listing
              nameLC = name.toLowerCase();
          // check for the word 'test' in the name(in lower case)
          rExp = / test /;
          if (rExp.test(nameLC)) // probable test button
          {
            dontpush = true; 
            //alert("dontpush test = " + dontpush);
          }
          // check for complete duplicate names
            var j = 0;
            for ( j = 0;  j < btnarray.length;  j++  )
            {
              if(name == btnarray[j][1])
              {
                dontpush = true; 
                //alert("dontpush duplicate = " + dontpush);            
              }
            } //end of duplicate names check
          // check for 'possible' duplicate names by percentage
          var tmpval = (nameLC.length * this.dupcheckpercent)/100; // length of compare string
          var tmpstr = nameLC.substring(0, tmpval);
            var k = 0;
            for ( k = 0;  k < btnarray.length;  k++  )
            {
              var tmpcheckstr = btnarray[k][0];
              var tmpcheckstrpc = tmpcheckstr.substring(0, tmpval);
              if(tmpstr == tmpcheckstrpc)
              {
                dontpush = true;
              }
            }  // end of percentage duplicate check   
          // find the homepage if there is one
            btnhomepage = mybuttons.getAttribute("homepage");
          // place in an array if all OK
              btnarray.push([nameLC,name,btn,btnimage,idx,ontb,btnhomepage,dontpush,menupad]);
              dontpush = false; // reset dontpush 
        }
      } //end of find custom buttons for array
      // sort on lower case name
      btnarray.sort(); 
        // add separator and "Click to see final list"
        btnarray.push(['separator',,,,,,,"carp"]);
        btnarray.push(["Click to see final list", "Click to see final list", "Click to see final list", nextlist, "", "", "", "carp"])
        // populate the start list
          makestartlist(); 
          this.appendChild(mPop);
          this.type = "menu";
          this.setAttribute("mylistdone", "true");
          mythis.setAttribute("seePopvisible", "false");
          this.image = listgreen;
      } // END of if my list done
    } // End list alert menu making
    /* +============= END OF MENU MAKING  =============+ */
    /* +==================================================================
            I M A G E   C H E C K   F U N C T I O N
       ==================================================================+ */
    function imagecheck()
    {
    mywidth = 0;
    var mykeystr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    //ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    //01234567890123456789012345678901234567890123456789012345678901234
    //          1         2         3         4         5         6
    // to check for a gif
    //
    // data:image/gif;base64,R0lGODlh <--- then next four chars! i.e. FgAM
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    // FgAM   width=Fg=22  height=AM=12   
    //
    // F=5 g=32  5*4 + 32/16 = 22 = width 
    //
    // A=0 M=12  0*16 + 12 = 12 = height
    // is it a gif?
    chopstr = "data:image/gif;base64,R0lGODlh";
    imgstr = "";
          rExp = /gif;base64/;
          if (rExp.test(btnimage)) // it's a gif
          {
            // if it's a gif get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by four (my width)
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // divide the index value of the second char by sixteen
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 16;
          } // END of check for gif
    // to check for an icon
    // 
    // data:image/x-icon;base64,AAABAA // use next four
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //EAEB = 16 = E*4 = 16
    //IAIC = 16 = I*4 /C = 16
    //IAEB = 16 = E*4 /B = 16
    //EAIC = 32 = I*4 = 32
    //EAQE = 64 = Q*4 = 64
    //
    //if first is I then divide by fourth
    // is it an icon?
    chopstr = "data:image/x-icon;base64,AAABAA";
    imgstr = "";
          rExp = /x-icon;base64/;
          if (rExp.test(btnimage)) // it's an icon
          {
            // if it's an icon get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the third char by four (my width)
            var tmpchar = imgstr.substring(2,3);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // if the first char is I then divide by fourth
            tmpcharcheck = imgstr.substring(0,1);
            if(tmpcharcheck == "I")
            {
              tmpchar = imgstr.substring(3,4);
              tmpidx = mykeystr.indexOf(tmpchar);
              mywidth = mywidth / tmpidx
            }
            //alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for icon
    // to check for a png
    // data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAA <-- to here then next four
    // 0123456789012345678901234567890123456789012345678901
    //           1         2         3         4         5
    // 
    //loo_AgCA  Ag=0*(?)+32=32   CA=2*16+0=32
    //cog_AgCA  
    //tls_APCA  AP=0*(?)+15=15   CA=2*16+0=32    //15x32 height width
    // is it a png?
    /*
    12x12  AwAAAAM_CAMAAABhq6zVAAAAB3RJTUUH2AQcFTAkJF
    16x16  BAAAAAQ_CAMAAAAoLQ9TAAAAB3RJTUUH
    24x24  BgAAAAY_CAMAAADXqc3KAAAAB3RJTUUH
    32x32  CAAAAAg_CAMAAABEpIrGAAAAB3RJTUUH2A
    32x16  CAAAAAQ_CAMAAABA3o1rAAAAB3RJTUUH2
    32x24  CAAAAAY_CAMAAACsjQ8GAAAAB3RJTUUH2A
    40x26  CgAAAAa_CAMAAADyku75AAAAB3RJTUUH2
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAaCAMAAADyku75AAAAB3RJTUUH2
    1st*16 + 2nd/4 + 3rd // width
    AwA = 12
    BAA = 16
    BgA = 24
    AAg = 32
    CAA = 32
    CAA = 32
    CgA = 32+8+0 = 40
    */
    chopstr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA"; // next seven
    imgstr = "";
          rExp = /png;base64/;
          if (rExp.test(btnimage)) // it's a png
          {
            // if it's a png get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 7);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by sixteen
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 16;
            // divide the index value of the second char by four
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 4;
            // add the index value of the third char
            tmpchar = imgstr.substring(2,3);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx;
          } // END of check for png
    // to check for a bmp
    //
    // data:image/bmp;base64,Qk3GBAAAAAAAADYEAAAoAAAA <--- then next seven chars
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //32x16 Qk02BgA_AAAAAADYEAAAoAAAAIA_AA_ABA_AAAABAAgAAAAAAAACAADCHgAAwh4AAAAAAA
    //32x24 Qk02BwA_AAAAAADYEAAAoAAAAIA_AA_ABg_AAAABAAgAAAAAAAADAADCHgAAwh4AAA
    //40x26 Qk1GCAA_AAAAAADYEAAAoAAAAKA_AA_ABo_AAAABAAgAAAAAABAEAADBHgAAwR4AAA
    //31x17 Qk1WBgA_AAAAAADYEAAAoAAAAHw_AA_ABE_AAAABAAgAAAAAACACAADCHgAAwh4AAA
    //
    //31x17 Hw= 7*4 + 48/16 = 28+3 = 31
    //31x17 BE= 1*16 + 4/4 = 16+1 = 17
    // is it a bmp?
    chopstr = "data:image/bmp;base64,Qk3GBAAAAAAAADYEAAAoAAAA";
    imgstr = "";
          rExp = /bmp;base64/;
          if (rExp.test(btnimage)) // it's a bmp
          {
            // if it's a bmp get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by four (my width)
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // divide the index value of the second char by sixteen
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 16;
            //alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for bmp
    // to check for a jpg
    //
    //data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAA 
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    //01234567890123456789012345678901234567890123456789012345678901234
    //          1         2         3         4         5         6
    //
    // 16x16 QABA  Q=16 + A = height  B*16 +  = width
    // 20x20 UABQ
    // 35x35 jACM
    // 40x33 hACg  h=33 + 0 = 40   C*16=32 + g/4=8  = 40 
    // 48x48 wADA
    // first two = height
    // is it a jpg?
    chopstr = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAA";
    imgstr = "";
          rExp = /jpeg;base64/;
          if (rExp.test(btnimage)) // it's a jpg
          {
            // if it's a jpg get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the third char by sixteen (my width)
            var tmpchar = imgstr.substring(2,3);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 16;
            // divide the index value of the fourth char by four
            tmpchar = imgstr.substring(3,4);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 4;
            // alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for jpg
    } // END of image check
    /* +==================================================================
            M A K E   C H E C K   L I S T   F U N C T I O N
       ==================================================================+ */
    function makechecklist()
    {
          // used to turn OFF list changes for this menu in toggle check
          mythis.setAttribute("seePopvisible", "true");
      mythis.removeChild(mPop);
      seePop=document.createElement('menupopup');
      for(i=0; i<btnarray.length; i++) 
      {
        // check for a nopusharray entry (will skip adding to report if true)
        // reset dontpush
        dontpush = btnarray[i][7];
      // if no entry in nopusharray - add to report  
          if(dontpush == false)
          {
            if (btnarray[i][0] =='separator')
            {
              seePop.appendChild(document.createElement('menuseparator'));
            }
            else
            {
              var mytmpitem = seePop.appendChild(nItem(btnarray[i][1],btnarray[i][1],btnarray[i] [1], btnarray[i][3],"one","two","three",btnarray[i][2]));
      // call make new div to lay our div over the entry
      makenewdiv(mytmpitem,i);
        //
        //alert("this = " + this + "\n\nmytmpitem = " + mytmpitem);
        //return;
            } // END of if dontpush else
          }
      } // END of for loop
        // add the separator and the "buttons"
        var myitem = seePop.appendChild(document.createElement('menuseparator'));
        myitem = seePop.appendChild(nItem("Copy to clipboard","Copy to clipboard","Copy to clipboard", clipcopy));
        myitem.tooltipText = "Copy to clipboard"
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
        divwrap.setAttribute("style", "vertical-align: middle;  width: 250px; ");
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;");
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        imgnode.src = clipcopy;
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        namenode = document.createTextNode(" Copy to clipboard");
        spanname.appendChild(namenode);
        divwrap.appendChild(spanname);
        divwrap.style.background = itemamber;
        myitem.appendChild(divwrap);
        myitem = seePop.appendChild(nItem("Return to change items","Return to change items","Return to change items", backlist));
        myitem.tooltipText = "Return to change items"
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
        divwrap.setAttribute("style", "vertical-align: middle;  width: 250px; ");
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;");
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        imgnode.src = backlist;
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        namenode = document.createTextNode(" Return to change items");
        spanname.appendChild(namenode);
        divwrap.appendChild(spanname);
        divwrap.style.background = itemamber;
        myitem.appendChild(divwrap);
          mythis.appendChild(seePop);
          mythis.type = "menu";
    } // END of make check list
    /* +===== START OF EVENT CAPTURE FOR EDIT LIST =====+ */
    /* +==================================================================
            T O G G L E   C H E C K   F U N C T I O N
       ==================================================================+ */
    this.togglecheck = function(evt)
    {
        var alertindex = 0;
        alertstring = "";
        makechange = false;
        // keep the target object for later replace
        var toggletarget = evt.target;
        // find the button ID
        var alertindex = evt.target.value;
        // find that ID in btnarray to get the index number
          for (var i=0;i<btnarray.length;i++)
          {
            if (btnarray[i][1] == alertindex)
            {
              whilecount = i;
            }
          } 
      // Don't do this if the other menu is visible.
      if(mythis.getAttribute("seePopvisible") == "false")
      {
      // toggle the state of dontpush and the image
      //
      // Note to self: intercept "Click to see final list" here (and the separator?)
        if(btnarray[whilecount][7] == true)
        {
          btnarray[whilecount][7] = false;
          makechange = true;
          if(colours == true)
          {
            //itemcolour = itemgreen;
          }
        }
        else
        {
            if(btnarray[whilecount][7] == false)
            {
              btnarray[whilecount][7] = true;
              makechange = true;
              if(colours == true)
              {
                //itemcolour = itemred;
              }
           } 
        }
      // add the changed entry to the menu
      if(makechange == true)
      {
        // alert("making an entry change");
        var newentry = mPop.appendChild(nItem(btnarray[whilecount][1],btnarray[whilecount][1],btnarray[whilecount] [1], btnarray[whilecount][3],"one","two","three",btnarray[whilecount][2]));
      // call make new div to lay our div over the entry
      makenewdiv(newentry,whilecount);
      // replace the old one with the new
          mPop.replaceChild(newentry,toggletarget);
      // highlight it to show that it has been changed
          //newentry.style.opacity = itembrt;
          // to make the id unique - first add the index number
          indexstring = "[" + whilecount + "]" + btnarray[whilecount][1];
          newentry.id = indexstring;
      // show the menu again
      if(showmenudelay == 0)
      {
        mPop.showPopup();  
      }
      else
      {
        mydelay = setTimeout(function(){viewmpop()}, showmenudelay);
      }
      } // END of if make change is true
        if(btnarray[whilecount][1] == "Click to see final list")
        {
          makechecklist();
        }
      } // END of if seePop visible
        if(alertindex == "Copy to clipboard")
        {
         // call copytoclip after list editing!!!
          copytoclip();
        var mytitle = "Your button list is on the clipboard\n\n";
        alertstring = "You can paste the list into your button list area ";
        alertstring += "in your profile.\n\n";
        alertstring += 'Click on the link for "User control panel"\n\n';
        alertstring += 'Then click on the "My custom Buttons" tab';
        var Msg = createMsg(mytitle);
        Msg.aMsg(alertstring);
        } 
        if(alertindex == "Return to change items")
        {
          mythis.removeChild(seePop);
          mythis.appendChild(mPop);
          mythis.type = "menu";
          //mPop.showPopup();
          mydelay = setTimeout(function(){viewmpop()}, showmenudelay);
          this.setAttribute("seePopvisible", "false");  
        } 
      // set this way to show seePop on ANY click - covers clicks on items
      if(mythis.getAttribute("seePopvisible") == "true")
      {
        mydelay = setTimeout(function(){viewseepop()}, showmenudelay);
        //seePop.maxWidth = 250;
      }
    }// end of togglecheck function
    /* +===== END OF EVENT CAPTURE FOR EDIT LIST =====+ */
    /* +============= Call functions below here =============+ */
    /* +==================================================================
            M A K E   S T A R T   L I S T   F U N C T I O N
       ==================================================================+ */
    function makestartlist()
    {
      for (var i=0;i<btnarray.length;i++)
      {
          if (btnarray[i][0] =='separator')
          {
            mPop.appendChild(document.createElement('menuseparator'));
          }
          else
          {
            var myitem = mPop.appendChild(nItem(btnarray[i][1],btnarray[i][1],btnarray[i] [1], btnarray[i][3],"one","two",btnarray[i][5],btnarray[i] [2]));
        if(btnarray[i][1] == "Click to see final list")
        {
          myitem.tooltipText = "Click to see final list";
        }
      // overlay our own div onto the menu item
        makenewdiv(myitem,i);
         } // end of else
      } // end of for var
    } // END of function makestartlist
    /* +==================================================================
            C O P Y   T O   C L I P B O A R D   F U N C T I O N
       ==================================================================+ */
    function copytoclip()
    {  
      // reset
      clipreport = "";
      cb_count = 0;
      // build clipboard report
      for(i=0; i<btnarray.length; i++) 
      {
        // check for a nopusharray entry (will skip adding to report if true)
        // reset dontpush
        dontpush = btnarray[i][7];
      // if no entry in nopusharray - add to report  
          if(dontpush == false)
          {
              cb_count++; // might as well count them
            // check for a home page (make CB link if there is one, else just list it)
              if (btnarray[i][6])
              {
                clipreport += "[cb=" + btnarray[i][6] + "~-+" + btnarray[i][3] + "]";
                clipreport += btnarray[i][1] + "[/cb]\n";
              }
              else
              {
                clipreport +="[IMG]" + btnarray[i][3] + "[/IMG]" + " ";
                clipreport += btnarray[i][1] + "\n";
              }
          } // end of push to cliparray
       } // end of build clipboard report
      buttonhead = "[b]Total listed buttons = " + cb_count + "[/b] (of ";
      buttonhead += cb_total + " active)";
      buttonhead = buttonhead + "\n\n";
      cliphead = buttonhead;
      clipreport = cliphead + clipreport;        
      //  Output the report to clip board.
      custombuttons.gClipboard.write("");  // clear the clipboard
      custombuttons.gClipboard.write(clipreport);  // inserts text into the clipboard
    } // end of copytoclip function
    /* +==================================================================
            M A K E   N E W   D I V   F U N C T I O N
       ==================================================================+ */
    function makenewdiv(myitem, i)
    {
      // since the popup content is a bit limited we'll create our
      // own content and lay it on top of the existing stuff.
      //
      // Effectively sit a <div> in there...
      // but not for the see checklist entry
      var makediv = true;
      if(btnarray[i][1] == "Click to see final list")
      {
        makediv = false;   
      }
      if(makediv == true)
      {
      // first our own wrapper
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
          divwrap.setAttribute("style", "vertical-align: bottom;  width: 250px; "); 
          // opacity: 0.85; vertical-align: bottom; 
          //divwrap.onclick = function(evt){togglecheck(click)};
      // then add show/dontshow tick or cross image
      if(mythis.getAttribute("seePopvisible") == "false")
      {
      if(ticks == true)
      {
        ticknode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        ticknode.setAttribute("style", "vertical-align: bottom; "); 
        // vertical-align: bottom; background: red;
          if(btnarray[i][7] == true)
          {
            imgtick = cross;
          }
          if(btnarray[i][7] == false)
          {
            imgtick = tick;
          }
        ticknode.src = imgtick;
        divwrap.appendChild(ticknode);
      } // END of if ticks is true
      } // END of if seepop is visible
      // then add the button image
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;"); // HATES percentage for padding!!!!
        // vertical-align: middle; background: blue;
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        // vertical-align bottom; background: green;
        imgnode.src = btnarray[i][3];
      // standardise?
        if(realsize == false)
        {
        imgnode.height = 16;
        imgnode.width = 16;
        }
      // centre images
        var tmpleft = parseInt((44 - imgnode.width)/2);
        var tmpright = 44 - (imgnode.width + tmpleft)
        tmpleft = tmpleft + "px";
        tmpright = tmpright + "px";
        imgnode.style.paddingLeft = tmpleft;
        imgnode.style.paddingRight = tmpright;
      // pad height of small images
        if(imgnode.height <= 16)
        {
          var tmptop = parseInt((24 - imgnode.height)/2);
          var tmpbottom = 24 - (imgnode.height + tmptop);
          tmptop = tmptop + "px";
          tmpbottom = tmpbottom + "px";
          imgnode.style.paddingTop = tmptop;
          imgnode.style.paddingBottom = tmpbottom;
        }
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
      // add the label (name)
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        // vertical-align: middle; background: yellow;
        // crop long names
        tmpnamecrop = btnarray[i] [1];
        if(tmpnamecrop.length > 35)
        {
          tmpnamecrop = tmpnamecrop.substring(0,35) + "...";
        }
        // add the text to the span
        namenode = document.createTextNode(" " + tmpnamecrop);
        spanname.appendChild(namenode);
        // add the span into the wrapper
        divwrap.appendChild(spanname);
      if(colours == true)
      {
      if(mythis.getAttribute("seePopvisible") == "false")
      {
        if(btnarray[i][7] == true) // don't push
        {
          divwrap.style.background = itemred;
        }
        if(btnarray[i][7] == false) // push
        {
          divwrap.style.background = itemgreen;
        }
      } // end of if seepop is not visible
      } // end of if colours true
      else
      {
          if(btnarray[i][1] == "Copy to clipboard")
          {
            divwrap.style.background = itemamber;
          }
          if(btnarray[i][1] == "Return to change items")
          {
            divwrap.style.background = itemamber;
          }
      } // end of if colours else
      if(mythis.getAttribute("seePopvisible") == "true");
      {
     //alert("seepop visible = ", + mythis.getAttribute("seePopvisible"));
        if(colours == true);
        {
          if(btnarray[i][1] == "Copy to clipboard")
          {
            divwrap.style.background = itemamber;
          }
          if(btnarray[i][1] == "Return to change items")
          {
            divwrap.style.background = itemamber;
          }
        } // end of if colours
      } // end of if seepop visible is true
      // and finally sit our own menuitem over the original
            myitem.appendChild(divwrap);
      } // END of if not click to see final list
    } // END of make new div
    var mydelay = setTimeout(function(){startlist()}, mywait);
    function startlist()
    {
      clearTimeout(mydelay);
      mythis.listalert();
    }
    // END of delay start
    // custombuttons.alertSlide("post setTimeout",this.listready);
    // Show the seePop after clicks on entries
    function viewseepop()
    {
        clearTimeout(mydelay);
        seePop.maxHeight = 400; // screen.availHeight - 50;
        // seePop.maxWidth = 250;
        seePop.showPopup();
    } // END of view the popup seepop
    function viewmpop()
    {
        clearTimeout(mydelay);
        mPop.maxHeight = 400; // screen.availHeight - 50;
        mPop.maxWidth = 250;
        mPop.showPopup();
    } // END of view the popup mpop
    //================ END ========================
    /*---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky", "SCClockDr");
    this.setAttribute('version','20080425.4.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/button-archive-list-user-profile.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true)
    

    Help Tab

    // +++============== Help for Button Archive ==================+++
    Index:
        1. Description
        2. What gets listed for showing
        3. Usage
             i. On first installing
            ii. Editing your list
           iii. Checking your list
            iv. Posting your list
        4. Remove dropdown marker
    N O T E :-
                This file will be too large to view in the alert window
                that is opened by the "Help" option in the main context
                menu. So to read it in full you will have to choose the 
                "Edit" option and then click on the "Help" tab.
    D E S C R I P T I O N
    =====================
    The button produces an editable list of all your buttons which you would like to show using the "My Custom Buttoms" tab in your user profile.
    Once checked by you, you can paste the finished list into the text box there.
    W H A T   G E T S   L I S T E D   F O R   S H O W I N G
    =======================================================
    The button does not display duplicates of your buttons with an exactly matching name.
    The button does not display any of your buttons with ' test ' in the name. (Note that it is looking for a space before and after the word.)
    To check for possible duplicated buttons with similar names the button checks (in lower case) the first nn% of each button name and does not display those that match a button already listed.
    If your list still shows duplicates, or misses out a button that is NOT a duplicate - change dupcheckpercent. (Or change the name!) Otherwise simply edit the list as explained below.
    U S A G E
    =========
    On first installing
    ===================
    Because we will be posting your button image on the forum, then just as for posting a complete button, the button image MUST be in base64 format because I cannot load a local image file from your computer.
    IF you have any home made buttons that have a local filename showing in the "Image" box when you have the "Edit" window open - this button will show an alert message of the form:-
              "This button image is a local file on your computer"
              "ID = XX . . . Button_Name"
              "On toolbar:- This_Toolbar"
              "Please edit the button and click on the ->Base64 button to the 
              right of the image box and then click on "OK""
              "Then click this button again."
    The Button Archive List button will then read the list again and will, one by one, alert you about any other buttons that are using local filenames.
    Once all your buttons are using images in base64 format the LED in the bottom left corner of the Button Archive List button will turn from red to green.
    Your list is now ready to view and edit.
    Editing your list
    =================
    Once the LED on the button is green, just click on it to see the editable list of your buttons.
    Buttons that will be shown in your profile have a green background. Those that the Archive button thinks are duplicates will have a red background and these will not be shown.
    Click on any button entry to toggle it from "show" (green) to "don't show" (red).
    Changes you make will be slightly highlighted to help you keep track.
    When you are done - click on the "See final list" button at the bottom of the listing.
    Checking your list
    ==================
    Just to make sure, when you click on the "See final list" button you'll see a different drop down which will show you what the list in your profile will look like.
    If you want to make more changes click on the "Return to edit" button at the bottom of the list.
    If you are happy with the list as it is then click on the "Copy to clipboard" button.
    Posting your list
    =================
    After you have edited your list and copied it to the clipboard click on the "User Control Panel" link near the top of forum pages.
    Then click on the "My Custom Buttons" tab.
    Click inside the main text box there and then paste your list into it.  Again, as a final check you can use "Preview" to see what your list will look like.
    T O   R E M O V E   T H E   D R O P D O W N   M A R K E R
    =========================================================
    Place the following code in your userChrome.css which is in the Chrome folder of your profile. You'll need to edit it to have the correct number for this button (custombuttons-buttonXX). (Just open the context menu and click on the "Help" option and you should see the button ID# in the title).
    /* Remove button archive list dropdown */
    toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    M Y   S C R A T C H P A D   S H O U L D N ' T   B E   H E R E ! !
    =================================================================
    mykeystr=
    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    0123456789012345678901234567890123456789012345678901234567890
              1         2         3         4         5
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA <-- to here then next seven
    12x12  AwAAAAM_CAMAAABhq6zVAAAAB3RJTUUH2AQcFTAkJF
    16x16  BAAAAAQ_CAMAAAAoLQ9TAAAAB3RJTUUH
    24x24  BgAAAAY_CAMAAADXqc3KAAAAB3RJTUUH
    32x32  CAAAAAg_CAMAAABEpIrGAAAAB3RJTUUH2A
    32x16  CAAAAAQ_CAMAAABA3o1rAAAAB3RJTUUH2
    32x24  CAAAAAY_CAMAAACsjQ8GAAAAB3RJTUUH2A
    40x26  CgAAAAa_CAMAAADyku75AAAAB3RJTUUH2
    iVBORw0KGgoAAAANSUhEUgAAACgAAAAaCAMAAADyku75AAAAB3RJTU
    1st*16 + 2nd/4 + 3rd // width
    AwA = 12
    BAA = 16
    BgA = 24
    AAg = 32
    CAA = 32
    CAA = 32
    CgA = 32+8+0 = 40
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAA //APCA
    0123456789012345678901234567890123456789012345678901 //234567890
              1         2         3         4         5
    data:image/x-icon;base64,AAABAAEAICAAAAEACA <--next four - use last two
    dic16x16_AwAQ Aw=0(+*?)48/3=16  AQ=0*16+16=16 // forced to same width and height
    avk16x16_BoBA Bo=?              BA=1*16+0=16
    mse32x32_CoCA Co=?              CA=2*16+0=32
    key32x32_DoAg Do=?              Ag=0*16+32=32
    data:image/x-icon;base64,AAABAAEAICAAAAEACA
    0123456789012345678901234567890123456789012345678901 
              1         2         3         4         5
    data:image/gif;base64,R0lGODlh <--- then next four chars!
    white32x32 IAAg
    arrow FwAX  Fw=23  X=23
    loo FwAe  Fw=23 e=30  Fw= first char*4 + second char/16? F=5 w=48 5*4 + 48/16 = 23
    bg FgAM Fg=22  M=12   F=5 g=32  5*4 + 32/16 = 22 // width height
    mega KQAQ KQ=41 Q=16    K=10 Q=16     10*4 + 16/16 = 41 // width height
    data:image/gif;base64,R0lGODlh
    0123456789012345678901234567890123456789012345678
              1         2         3         4
    
  63. Button Archive ver 4.09 TIDY

    Code Tab

    /*Code*/
    // See the initialise tab for user options
    /* Using the Button Archive List button
       ====================================
        Click on any item to toggle it from:-
        Show button (green background)
        to
        Don't show button (red background)
        Once done, click on the "See final list" button at the 
        bottom of the menu to check your list before posting.
        In the (final) check list popup you can return to the edit list or
        copy your final list to the clipboard using the buttons at
        the bottom of the list.
    */
      this.togglecheck(event);
    

    Initialization Tab

    /*Initialization code*/
    /* +================  Start of user options ================+ */
    //
    // If all your buttons are not listed on startup you may need more than a four
    // second delay before the button list is built. Try adding a couple of seconds.
    var mywait = 4;
    //
    // When checking for possible duplicate button versions the button
    // looks at the first nn% of button names. (see "Help" tab for more)
    this.dupcheckpercent = 70;
    //
    // Menus should automatically refresh after being clicked on. If they don't
    // and you have to click the archive button again to see a menu try 
    // increasing the time. First to any small non-zero single digit, and if that
    // doesn't work start delay from 100 to perhaps 250 or even 500
    var showmenudelay = 0
    //
    // You can see the icons at real size or at a standard size...
    var realsize = true; // set to false for a standard 16x16
    //
    // You can see either colours, or ticks, or both
    // just set one or both to true or false
    var ticks = true;
    var colours = true;
    /* +================  End of user options ================+ */
    //this.setAttribute( 'onclick', 'gQuot( event, this )' ); 
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important;");
    var nextlist = "data:image/gif;base64,R0lGODlhGAAYAIcAAAF4tAN5tQR5tQR6tQV6tQd8tgh8tgl8twt+twx+tw1+txCAuBCAuRGBuRKBuRKBuhiEuxiFuxmFvBqFvByGvB2HvSOKviOKvySKvieMvyOMwCuOwSuQwy2Qwi6QwTCRwzKTxTSUxTeVxTaXyDuXxTqYxzyYxz2Yxj+Zxj6ayEWdykadyEedyUaey0eeykieyUify0qfyU6hy0yhzEuk0F2pz1ao0Vup0Vuq0luq01yu1mGr0GGt1GWt0Wau02Wv1Wqv02Sx12qw02qx1mqy12yx022z1m2z126012643Xa32nm623q62nq93n683H+83H7C5X/D5fpU+IC72YC93IG93YjA3InA3IvB3YvE343C3Y/D3pDE3pPF35PG34DD5YHD5YLD5YLE5YPE5YPF5YXD4oTF5YXF5YXG5obG5YfG5YbG5ojG5YjH5YnH5YjH54nH5orH5YrH5ovI5ozI5o3J547J54/J547K54/K543K6I7K6I/K6JDJ55DK55HK55HL55LK55LL55XI4JfI4JTL55XM6JbM6JfN6JnN55jN6JnN6JjO6JnO6JrO6JvP6JvP6ZzP6Z3P6ZrQ6pzQ6pzQ657Q6Z/Q6aLO46fQ5aDR6qLR6qPS6qLT7KTS6aTS6qXS6qXT6qbV7KrS5q7U56jU6qrV66zW7K7W7K7X7K/X7K/a7rDU57DV6LDX7LDa7rLY7LLb77bY6crj78Pj88Xj88Xk88/p9dPr9tjs9tjt9tzu9+bz+ef0+e/2+u/3+u/3+/D3+vD3+/H3+/D4+/H4+vH4+/L4+/P4+/P5+/T5+/X5/PX6/Pb6/Pb7/Pf7/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358v/69//88v/4+f/7/f/9+f//+f//+/3////8/v///f/+/yH5BAMAADIALAAAAAAUABcAAAj/AGUIHEgwixUrWQgqFKgEjQ9SU4L8+xdkCikfaZIoxKHNWbIN/3TZs6fr34ZkzeSdIZjjn7BPGlZ52bLFyyoNnowhW0Nwx7xONoBcwJAhA4YLQGoUy7RnoL8e/0ItQQTK0KKrixg5oTVLD5YhRY4IeTaKlatIp0yplRWL1iROeqj887eP379qE/tdy1cPH6RaxI6BYxPlX7Rx3tYF+1dARIEAAgz8Y8JDBw1KUv4pgwbNW6qJCv6Z+3dAURM4ctqoybyMWzR1pSYKMGPimwFeUOTEyfOkyr/W1KZlw4ZAXwkV/wj0ckNnTiEkRH5zY3bPX4MvI9ANCOHAl5s6dTTdyvjxW5q7fwrIkAAD4J+jAsDeBOoDa8YHze3KIfgHIoyAf6okkkIjggjSRy4tWPDbNPf0w8A/CUzEhR2YAFJgH7+4UMGC1vzzzgL/sENPF3cQMsiFubwgwW/bRJOOP638c84/WhxyIoovUPBbNN5wQ04/8MTzjxF4/OHHkXzgkuM/w0TDTTjiqBMPPP+UIcottmT5CjsTRDDRl2D+8wALL8RgZgwrPOLBCRx44OabHaAAASpi1CnGGFfIsEkll/R5iSWAXlKJJAsJFBAAOw==";
    var backlist = "data:image/gif;base64,R0lGODlhGAAYAIcAAAF4tAN5tQR5tQR6tQV6tQd8tgh8tgl8twt+twx+tw1+txCAuBCAuRGBuRKBuRKBuhiEuxiFuxmFvBqFvByGvB2HvSOKviOKvySKvieMvyOMwCuOwSuQwy2Qwi6QwTCRwzKTxTSUxTeVxTaXyDuXxTqYxzyYxz2Yxj+Zxj6ayEWdykadyEedyUaey0eeykieyUify0qfyU6hy0yhzEuk0F2pz1ao0Vup0Vuq0luq01yu1mGr0GGt1GWt0Wau02Wv1Wqv02Sx12qw02qx1mqy12yx022z1m2z126012643Xa32nm623q62nq93n683H+83H7C5X/D5fpU+IC72YC93IG93YjA3InA3IvB3YvE343C3Y/D3pDE3pPF35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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAP8ALAAAAAAKAAoAAAhRAHEIHEgQhwYRA01caCCwgYQROFBgWIBBYAcGEDxQUIDhhEAWHA4EGFDB40AQBQAI+ECQRIQDBgg8QCjwQoIKIS4ggAARBwYOHlVoSJChoNGAADs=";
    var limit=10;
    var mPop;
    var seePop;
    var alertstring = "";
    var btn = "";
    var btnid = "";
    var btnimage = "";
    var btntip = "";
    var button_count;
    var btnhomepage = "";
    var buttonhead = "";
    var cb_count = 0;
    var cb_total = 0;
    var cbparent = "";
    var checkdata = "";
    var cliphead = "";
    var clipreport = "";
    var dontpush = false;
    var hidepadding = "#ffffff";
    var idx = 0;
    var indexstring = "";
    var itemcolour = "";
    var itemamber = "#e6dd76";
    var itemgreen = "#87a705"
    var itemred = "#f5cbcb";
    //var itemgreen = "#CBCDB4"
    //var itemred = "#E2E2DB";
    var itemlight = "";
    var itembrt = 0.99;
    var itemmed = 0.75; // .75
    var itemdim = 0.50; // .5
    var listcomplete = false;
    var makechange = false;
    var mybuttons;
    var mylabel = "";
    var name = "";
    var namecrop = "";
    var nameLC = "";
    var ontb = "";
    var rExp = "";
    var testreport = "";
    var teststr = "";
    var whilecount = 0;
    //imagecheck vars
    var imgstr = "";
    var chopstr = "";
    var mywidth = 0;
    var menupad = "";
    //use . _ l j at menupadarry[0][required pad width] to make the padding
    // l=2px j=3px .=4px _=6px
    var menupadarray = new Array();
    menupadarray.push(["","","l","j",".","jl","_",".j","..","jjj","._","..j","...",".j_","._.","...j",".__","._.j","___",".__j","._._",".j.j.j",".___","._._j","____","___.j","._.__"]);
    var mythis = this.getAttribute("id");
    mythis = document.getElementById(mythis);
    mywait = mywait * 1000;
    this.setAttribute("mylistdone", "false");
    mythis.setAttribute("seePopvisible", "false");
    this.setAttribute("base64missing", "false");
    this.tooltipText = "Button Archive List";
    this.image = listred;
    var btnarray = new Array();
    var cliparray = new Array();
        let nItem = function(label,value,name,img,btntip,namecrop,ontb,btn)
        {
          var mItem=document.createElement('menuitem');
          mItem.setAttribute('label',label);  // namecrop);
          mItem.value = value;
          mItem.tooltipText = "ID = " + btn + "    " + name;
          mItem.setAttribute('class','menuitem-iconic');
          mItem.setAttribute('image',img);
          mItem.setAttribute('name',name);
          return mItem;
        }
    /* +==================================================================
            L I S T   A L E R T   F U N C T I O N
       ==================================================================+ */
    mythis.listalert = function(evt)
    {
      // make the menupopup
       if(this.getAttribute("mylistdone") == "false")
       {
        mPop=document.createElement('menupopup');
        mPop.maxHeight = 400; // screen.availHeight - 50;
        mPop.maxWidth = 250;
        // end of make menupopup
      // reset btn array and cb_count
        btnarray = new Array();
        cb_count = 0;
        cb_total = 0;
      //  Obtain list of available buttons
        var buttons = document.getElementsByTagName("toolbarbutton");
        button_count = buttons.length;
      //  For each button find name and id#. 
      var i = 0;  
      for ( i = 1;  i < button_count;  i++  )
      {
        mybuttons = buttons[i];
        btnid = mybuttons.getAttribute("id");
        // Do a test for "custombuttons-buttonxxx"         
        // IF this Button is custom collect its details
        rExp = /custombuttons-button/;
        if (rExp.test(btnid)) // Our kind of custom button (thanks SCClockDr)
        {
          name = mybuttons.getAttribute("label");
          cb_total++ // full count of buttons
          // get the toolbar that the button is on
          ontb = mybuttons.parentNode.id;
          // cut for digits only
          btn = custombuttons.getNumber(btnid); // (thanks SCClockDr)
          btntip = btn
          // show button icons 
            btnimage = mybuttons.getAttribute("image");
            checkdata = btnimage.substring(0,8);
          // check to see if it is base 64
        this.setAttribute("base64missing", "false"); 
        var passimage = true ;
        // set up for alert if not a base64 image
        rExp = /base64/;
        if (!rExp.test(btnimage)) // file on local computer
        {
          passimage = false;
        }
        // reset to allow for xbitmaps such as the clock button
        rExp = /xbitmap/;
        if (rExp.test(btnimage))
        {
          passimage = true;
        }    
        if(passimage == false)
        {
              alertstring = "";
              alertstring = "This button image is a local file on your computer.\n\n";
              alertstring += "ID = " + btn + " . . . ";
              alertstring += name + "\n\n";
              alertstring += "On toolbar:- " + '"' + ontb + '"' + "\n\n";
              alertstring += "Please edit the button and click on the ";
              alertstring += "->Base64 button to the right of the image box \n";
              alertstring += "and then click on " + '"' + "OK" + '"' + ". \n\n";
              alertstring += "Then click this button again.\n\n";
              alertstring += "SEE the HELP tab for why you need to do this.";
              var mytitle = "Button Archive List - missing =>base64";
              var Msg = createMsg(mytitle);
              Msg.aMsg(alertstring);
              //alert(" " + alertstring);
              this.setAttribute("base64missing", "true");
              return;
        }
        // call the imagecheck function to create padding
        // for the various image types and sizes
        if(passimage == true)
        {
          imagecheck();
    /*
          rExp = /x-icon;base64/;
          if (rExp.test(btnimage)) // it's an icon
          {
            teststr += btnimage.substring(25,85) + " " + mywidth + " " + name + "\n";
          }
    */
          // assume a nominal max image width is 32 and desired space = 38
          // get the difference and create a pad string with . and _ and j
          // which are four and six and three pixels wide
          tmp = 38 - mywidth;
          // if no width then image type not covered
          if(mywidth == 0)
          {
            tmp = 4;
          }
          // correct for images larger than 38
          if(tmp < 4)
          {
            tmp = 4;
          }
          if(realsize == false)
          {
            tmp = 10;
          }
          menupad = menupadarray[0][tmp];
          // 
          //alert("name = " + name + "\n\nmywidth = " + mywidth);
          //return;
        }
          // manipulate name for sorting and listing
              nameLC = name.toLowerCase();
          // check for the word 'test' in the name(in lower case)
          rExp = / test /;
          if (rExp.test(nameLC)) // probable test button
          {
            dontpush = true; 
            //alert("dontpush test = " + dontpush);
          }
          // check for complete duplicate names
            var j = 0;
            for ( j = 0;  j < btnarray.length;  j++  )
            {
              if(name == btnarray[j][1])
              {
                dontpush = true; 
                //alert("dontpush duplicate = " + dontpush);            
              }
            } //end of duplicate names check
          // check for 'possible' duplicate names by percentage
          var tmpval = (nameLC.length * this.dupcheckpercent)/100; // length of compare string
          var tmpstr = nameLC.substring(0, tmpval);
            var k = 0;
            for ( k = 0;  k < btnarray.length;  k++  )
            {
              var tmpcheckstr = btnarray[k][0];
              var tmpcheckstrpc = tmpcheckstr.substring(0, tmpval);
              if(tmpstr == tmpcheckstrpc)
              {
                dontpush = true;
              }
            }  // end of percentage duplicate check   
          // find the homepage if there is one
            btnhomepage = mybuttons.getAttribute("homepage");
          // place in an array if all OK
              btnarray.push([nameLC,name,btn,btnimage,idx,ontb,btnhomepage,dontpush,menupad]);
              dontpush = false; // reset dontpush 
        }
      } //end of find custom buttons for array
      // sort on lower case name
      btnarray.sort(); 
        // add separator and "Click to see final list"
        btnarray.push(['separator',,,,,,,"carp"]);
        btnarray.push(["Click to see final list", "Click to see final list", "Click to see final list", nextlist, "", "", "", "carp"])
        // populate the start list
          makestartlist(); 
          this.appendChild(mPop);
          this.type = "menu";
          this.setAttribute("mylistdone", "true");
          mythis.setAttribute("seePopvisible", "false");
          this.image = listgreen;
      } // END of if my list done
    } // End list alert menu making
    /* +============= END OF MENU MAKING  =============+ */
    /* +==================================================================
            I M A G E   C H E C K   F U N C T I O N
       ==================================================================+ */
    function imagecheck()
    {
    mywidth = 0;
    var mykeystr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    //ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    //01234567890123456789012345678901234567890123456789012345678901234
    //          1         2         3         4         5         6
    // to check for a gif
    //
    // data:image/gif;base64,R0lGODlh <--- then next four chars! i.e. FgAM
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    // FgAM   width=Fg=22  height=AM=12   
    //
    // F=5 g=32  5*4 + 32/16 = 22 = width 
    //
    // A=0 M=12  0*16 + 12 = 12 = height
    // is it a gif?
    chopstr = "data:image/gif;base64,R0lGODlh";
    imgstr = "";
          rExp = /gif;base64/;
          if (rExp.test(btnimage)) // it's a gif
          {
            // if it's a gif get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by four (my width)
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // divide the index value of the second char by sixteen
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 16;
          } // END of check for gif
    // to check for an icon
    // 
    // data:image/x-icon;base64,AAABAA // use next four
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //EAEB = 16 = E*4 = 16
    //IAIC = 16 = I*4 /C = 16
    //IAEB = 16 = E*4 /B = 16
    //EAIC = 32 = I*4 = 32
    //EAQE = 64 = Q*4 = 64
    //
    //if first is I then divide by fourth
    // is it an icon?
    chopstr = "data:image/x-icon;base64,AAABAA";
    imgstr = "";
          rExp = /x-icon;base64/;
          if (rExp.test(btnimage)) // it's an icon
          {
            // if it's an icon get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the third char by four (my width)
            var tmpchar = imgstr.substring(2,3);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // if the first char is I then divide by fourth
            tmpcharcheck = imgstr.substring(0,1);
            if(tmpcharcheck == "I")
            {
              tmpchar = imgstr.substring(3,4);
              tmpidx = mykeystr.indexOf(tmpchar);
              mywidth = mywidth / tmpidx
            }
            //alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for icon
    // to check for a png
    // data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAA <-- to here then next four
    // 0123456789012345678901234567890123456789012345678901
    //           1         2         3         4         5
    // 
    //loo_AgCA  Ag=0*(?)+32=32   CA=2*16+0=32
    //cog_AgCA  
    //tls_APCA  AP=0*(?)+15=15   CA=2*16+0=32    //15x32 height width
    // is it a png?
    /*
    12x12  AwAAAAM_CAMAAABhq6zVAAAAB3RJTUUH2AQcFTAkJF
    16x16  BAAAAAQ_CAMAAAAoLQ9TAAAAB3RJTUUH
    24x24  BgAAAAY_CAMAAADXqc3KAAAAB3RJTUUH
    32x32  CAAAAAg_CAMAAABEpIrGAAAAB3RJTUUH2A
    32x16  CAAAAAQ_CAMAAABA3o1rAAAAB3RJTUUH2
    32x24  CAAAAAY_CAMAAACsjQ8GAAAAB3RJTUUH2A
    40x26  CgAAAAa_CAMAAADyku75AAAAB3RJTUUH2
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAaCAMAAADyku75AAAAB3RJTUUH2
    1st*16 + 2nd/4 + 3rd // width
    AwA = 12
    BAA = 16
    BgA = 24
    AAg = 32
    CAA = 32
    CAA = 32
    CgA = 32+8+0 = 40
    */
    chopstr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA"; // next seven
    imgstr = "";
          rExp = /png;base64/;
          if (rExp.test(btnimage)) // it's a png
          {
            // if it's a png get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 7);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by sixteen
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 16;
            // divide the index value of the second char by four
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 4;
            // add the index value of the third char
            tmpchar = imgstr.substring(2,3);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx;
          } // END of check for png
    // to check for a bmp
    //
    // data:image/bmp;base64,Qk3GBAAAAAAAADYEAAAoAAAA <--- then next seven chars
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //32x16 Qk02BgA_AAAAAADYEAAAoAAAAIA_AA_ABA_AAAABAAgAAAAAAAACAADCHgAAwh4AAAAAAA
    //32x24 Qk02BwA_AAAAAADYEAAAoAAAAIA_AA_ABg_AAAABAAgAAAAAAAADAADCHgAAwh4AAA
    //40x26 Qk1GCAA_AAAAAADYEAAAoAAAAKA_AA_ABo_AAAABAAgAAAAAABAEAADBHgAAwR4AAA
    //31x17 Qk1WBgA_AAAAAADYEAAAoAAAAHw_AA_ABE_AAAABAAgAAAAAACACAADCHgAAwh4AAA
    //
    //31x17 Hw= 7*4 + 48/16 = 28+3 = 31
    //31x17 BE= 1*16 + 4/4 = 16+1 = 17
    // is it a bmp?
    chopstr = "data:image/bmp;base64,Qk3GBAAAAAAAADYEAAAoAAAA";
    imgstr = "";
          rExp = /bmp;base64/;
          if (rExp.test(btnimage)) // it's a bmp
          {
            // if it's a bmp get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by four (my width)
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // divide the index value of the second char by sixteen
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 16;
            //alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for bmp
    // to check for a jpg
    //
    //data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAA 
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    //01234567890123456789012345678901234567890123456789012345678901234
    //          1         2         3         4         5         6
    //
    // 16x16 QABA  Q=16 + A = height  B*16 +  = width
    // 20x20 UABQ
    // 35x35 jACM
    // 40x33 hACg  h=33 + 0 = 40   C*16=32 + g/4=8  = 40 
    // 48x48 wADA
    // first two = height
    // is it a jpg?
    chopstr = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAA";
    imgstr = "";
          rExp = /jpeg;base64/;
          if (rExp.test(btnimage)) // it's a jpg
          {
            // if it's a jpg get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the third char by sixteen (my width)
            var tmpchar = imgstr.substring(2,3);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 16;
            // divide the index value of the fourth char by four
            tmpchar = imgstr.substring(3,4);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 4;
            // alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for jpg
    } // END of image check
    /* +==================================================================
            M A K E   C H E C K   L I S T   F U N C T I O N
       ==================================================================+ */
    function makechecklist()
    {
          // used to turn OFF list changes for this menu in toggle check
          mythis.setAttribute("seePopvisible", "true");
      mythis.removeChild(mPop);
      seePop=document.createElement('menupopup');
      for(i=0; i<btnarray.length; i++) 
      {
        // check for a nopusharray entry (will skip adding to report if true)
        // reset dontpush
        dontpush = btnarray[i][7];
      // if no entry in nopusharray - add to report  
          if(dontpush == false)
          {
            if (btnarray[i][0] =='separator')
            {
              seePop.appendChild(document.createElement('menuseparator'));
            }
            else
            {
              var mytmpitem = seePop.appendChild(nItem(btnarray[i][1],btnarray[i][1],btnarray[i] [1], btnarray[i][3],"one","two","three",btnarray[i][2]));
      // call make new div to lay our div over the entry
      makenewdiv(mytmpitem,i);
        //
        //alert("this = " + this + "\n\nmytmpitem = " + mytmpitem);
        //return;
            } // END of if dontpush else
          }
      } // END of for loop
        // add the separator and the "buttons"
        var myitem = seePop.appendChild(document.createElement('menuseparator'));
        myitem = seePop.appendChild(nItem("Copy to clipboard","Copy to clipboard","Copy to clipboard", clipcopy));
        myitem.tooltipText = "Copy to clipboard"
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
        divwrap.setAttribute("style", "vertical-align: middle;  width: 250px; ");
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;");
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        imgnode.src = clipcopy;
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        namenode = document.createTextNode(" Copy to clipboard");
        spanname.appendChild(namenode);
        divwrap.appendChild(spanname);
        divwrap.style.background = itemamber;
        myitem.appendChild(divwrap);
        myitem = seePop.appendChild(nItem("Return to change items","Return to change items","Return to change items", backlist));
        myitem.tooltipText = "Return to change items"
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
        divwrap.setAttribute("style", "vertical-align: middle;  width: 250px; ");
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;");
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        imgnode.src = backlist;
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        namenode = document.createTextNode(" Return to change items");
        spanname.appendChild(namenode);
        divwrap.appendChild(spanname);
        divwrap.style.background = itemamber;
        myitem.appendChild(divwrap);
          mythis.appendChild(seePop);
          mythis.type = "menu";
    } // END of make check list
    /* +===== START OF EVENT CAPTURE FOR EDIT LIST =====+ */
    /* +==================================================================
            T O G G L E   C H E C K   F U N C T I O N
       ==================================================================+ */
    this.togglecheck = function(evt)
    {
        var alertindex = 0;
        alertstring = "";
        makechange = false;
        // keep the target object for later replace
        var toggletarget = evt.target;
        // find the button ID
        var alertindex = evt.target.value;
        // find that ID in btnarray to get the index number
          for (var i=0;i<btnarray.length;i++)
          {
            if (btnarray[i][1] == alertindex)
            {
              whilecount = i;
            }
          } 
      // Don't do this if the other menu is visible.
      if(mythis.getAttribute("seePopvisible") == "false")
      {
      // toggle the state of dontpush and the image
      //
      // Note to self: intercept "Click to see final list" here (and the separator?)
        if(btnarray[whilecount][7] == true)
        {
          btnarray[whilecount][7] = false;
          makechange = true;
          if(colours == true)
          {
            //itemcolour = itemgreen;
          }
        }
        else
        {
            if(btnarray[whilecount][7] == false)
            {
              btnarray[whilecount][7] = true;
              makechange = true;
              if(colours == true)
              {
                //itemcolour = itemred;
              }
           } 
        }
      // add the changed entry to the menu
      if(makechange == true)
      {
        // alert("making an entry change");
        var newentry = mPop.appendChild(nItem(btnarray[whilecount][1],btnarray[whilecount][1],btnarray[whilecount] [1], btnarray[whilecount][3],"one","two","three",btnarray[whilecount][2]));
      // call make new div to lay our div over the entry
      makenewdiv(newentry,whilecount);
      // replace the old one with the new
          mPop.replaceChild(newentry,toggletarget);
      // highlight it to show that it has been changed
          //newentry.style.opacity = itembrt;
          // to make the id unique - first add the index number
          indexstring = "[" + whilecount + "]" + btnarray[whilecount][1];
          newentry.id = indexstring;
      // show the menu again
      if(showmenudelay == 0)
      {
        mPop.showPopup();  
      }
      else
      {
        mydelay = setTimeout(function(){viewmpop()}, showmenudelay);
      }
      } // END of if make change is true
        if(btnarray[whilecount][1] == "Click to see final list")
        {
          makechecklist();
        }
      } // END of if seePop visible
        if(alertindex == "Copy to clipboard")
        {
         // call copytoclip after list editing!!!
          copytoclip();
        var mytitle = "Your button list is on the clipboard\n\n";
        alertstring = "You can paste the list into your button list area ";
        alertstring += "in your profile.\n\n";
        alertstring += 'Click on the link for "User control panel"\n\n';
        alertstring += 'Then click on the "My custom Buttons" tab';
        var Msg = createMsg(mytitle);
        Msg.aMsg(alertstring);
        } 
        if(alertindex == "Return to change items")
        {
          mythis.removeChild(seePop);
          mythis.appendChild(mPop);
          mythis.type = "menu";
          //mPop.showPopup();
          mydelay = setTimeout(function(){viewmpop()}, showmenudelay);
          this.setAttribute("seePopvisible", "false");  
        } 
      // set this way to show seePop on ANY click - covers clicks on items
      if(mythis.getAttribute("seePopvisible") == "true")
      {
        mydelay = setTimeout(function(){viewseepop()}, showmenudelay);
        //seePop.maxWidth = 250;
      }
    }// end of togglecheck function
    /* +===== END OF EVENT CAPTURE FOR EDIT LIST =====+ */
    /* +============= Call functions below here =============+ */
    /* +==================================================================
            M A K E   S T A R T   L I S T   F U N C T I O N
       ==================================================================+ */
    function makestartlist()
    {
      for (var i=0;i<btnarray.length;i++)
      {
          if (btnarray[i][0] =='separator')
          {
            mPop.appendChild(document.createElement('menuseparator'));
          }
          else
          {
            var myitem = mPop.appendChild(nItem(btnarray[i][1],btnarray[i][1],btnarray[i] [1], btnarray[i][3],"one","two",btnarray[i][5],btnarray[i] [2]));
        if(btnarray[i][1] == "Click to see final list")
        {
          myitem.tooltipText = "Click to see final list";
        }
      // overlay our own div onto the menu item
        makenewdiv(myitem,i);
         } // end of else
      } // end of for var
    } // END of function makestartlist
    /* +==================================================================
            C O P Y   T O   C L I P B O A R D   F U N C T I O N
       ==================================================================+ */
    function copytoclip()
    {  
      // reset
      clipreport = "";
      cb_count = 0;
      // build clipboard report
      for(i=0; i<btnarray.length; i++) 
      {
        // check for a nopusharray entry (will skip adding to report if true)
        // reset dontpush
        dontpush = btnarray[i][7];
      // if no entry in nopusharray - add to report  
          if(dontpush == false)
          {
              cb_count++; // might as well count them
            // check for a home page (make CB link if there is one, else just list it)
              if (btnarray[i][6])
              {
                clipreport += "[cb=" + btnarray[i][6] + "~-+" + btnarray[i][3] + "]";
                clipreport += btnarray[i][1] + "[/cb]\n";
              }
              else
              {
                clipreport +="[IMG]" + btnarray[i][3] + "[/IMG]" + " ";
                clipreport += btnarray[i][1] + "\n";
              }
          } // end of push to cliparray
       } // end of build clipboard report
      buttonhead = "[b]Total listed buttons = " + cb_count + "[/b] (of ";
      buttonhead += cb_total + " active)";
      buttonhead = buttonhead + "\n\n";
      cliphead = buttonhead;
      clipreport = cliphead + clipreport;        
      //  Output the report to clip board.
      custombuttons.gClipboard.write("");  // clear the clipboard
      custombuttons.gClipboard.write(clipreport);  // inserts text into the clipboard
    } // end of copytoclip function
    /* +==================================================================
            M A K E   N E W   D I V   F U N C T I O N
       ==================================================================+ */
    function makenewdiv(myitem, i)
    {
      // since the popup content is a bit limited we'll create our
      // own content and lay it on top of the existing stuff.
      //
      // Effectively sit a <div> in there...
      // but not for the see checklist entry
      var makediv = true;
      if(btnarray[i][1] == "Click to see final list")
      {
        makediv = false;   
      }
      if(makediv == true)
      {
      // first our own wrapper
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
          divwrap.setAttribute("style", "vertical-align: bottom;  width: 250px; "); 
          // opacity: 0.85; vertical-align: bottom; 
          //divwrap.onclick = function(evt){togglecheck(click)};
      // then add show/dontshow tick or cross image
      if(mythis.getAttribute("seePopvisible") == "false")
      {
      if(ticks == true)
      {
        ticknode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        ticknode.setAttribute("style", "vertical-align: bottom; "); 
        // vertical-align: bottom; background: red;
          if(btnarray[i][7] == true)
          {
            imgtick = cross;
          }
          if(btnarray[i][7] == false)
          {
            imgtick = tick;
          }
        ticknode.src = imgtick;
        divwrap.appendChild(ticknode);
      } // END of if ticks is true
      } // END of if seepop is visible
      // then add the button image
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;"); // HATES percentage for padding!!!!
        // vertical-align: middle; background: blue;
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        // vertical-align bottom; background: green;
        imgnode.src = btnarray[i][3];
      // standardise?
        if(realsize == false)
        {
        imgnode.height = 16;
        imgnode.width = 16;
        }
      // centre images
        var tmpleft = parseInt((44 - imgnode.width)/2);
        var tmpright = 44 - (imgnode.width + tmpleft)
        tmpleft = tmpleft + "px";
        tmpright = tmpright + "px";
        imgnode.style.paddingLeft = tmpleft;
        imgnode.style.paddingRight = tmpright;
      // pad height of small images
        if(imgnode.height <= 16)
        {
          var tmptop = parseInt((24 - imgnode.height)/2);
          var tmpbottom = 24 - (imgnode.height + tmptop);
          tmptop = tmptop + "px";
          tmpbottom = tmpbottom + "px";
          imgnode.style.paddingTop = tmptop;
          imgnode.style.paddingBottom = tmpbottom;
        }
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
      // add the label (name)
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        // vertical-align: middle; background: yellow;
        // crop long names
        tmpnamecrop = btnarray[i] [1];
        if(tmpnamecrop.length > 35)
        {
          tmpnamecrop = tmpnamecrop.substring(0,35) + "...";
        }
        // add the text to the span
        namenode = document.createTextNode(" " + tmpnamecrop);
        spanname.appendChild(namenode);
        // add the span into the wrapper
        divwrap.appendChild(spanname);
      if(colours == true)
      {
      if(mythis.getAttribute("seePopvisible") == "false")
      {
        if(btnarray[i][7] == true) // don't push
        {
          divwrap.style.background = itemred;
        }
        if(btnarray[i][7] == false) // push
        {
          divwrap.style.background = itemgreen;
        }
      } // end of if seepop is not visible
      } // end of if colours true
      else
      {
          if(btnarray[i][1] == "Copy to clipboard")
          {
            divwrap.style.background = itemamber;
          }
          if(btnarray[i][1] == "Return to change items")
          {
            divwrap.style.background = itemamber;
          }
      } // end of if colours else
      if(mythis.getAttribute("seePopvisible") == "true");
      {
     //alert("seepop visible = ", + mythis.getAttribute("seePopvisible"));
        if(colours == true);
        {
          if(btnarray[i][1] == "Copy to clipboard")
          {
            divwrap.style.background = itemamber;
          }
          if(btnarray[i][1] == "Return to change items")
          {
            divwrap.style.background = itemamber;
          }
        } // end of if colours
      } // end of if seepop visible is true
      // and finally sit our own menuitem over the original
            myitem.appendChild(divwrap);
      } // END of if not click to see final list
    } // END of make new div
    var mydelay = setTimeout(function(){startlist()}, mywait);
    function startlist()
    {
      clearTimeout(mydelay);
      mythis.listalert();
    }
    // END of delay start
    // custombuttons.alertSlide("post setTimeout",this.listready);
    // Show the seePop after clicks on entries
    function viewseepop()
    {
        clearTimeout(mydelay);
        seePop.maxHeight = 400; // screen.availHeight - 50;
        // seePop.maxWidth = 250;
        seePop.showPopup();
    } // END of view the popup seepop
    function viewmpop()
    {
        clearTimeout(mydelay);
        mPop.maxHeight = 400; // screen.availHeight - 50;
        mPop.maxWidth = 250;
        mPop.showPopup();
    } // END of view the popup mpop
    //================ END ========================
    /*---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky", "SCClockDr");
    this.setAttribute('version','20080425.4.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/button-archive-list-user-profile.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true)
    

    Help Tab

    // +++============== Help for Button Archive ==================+++
    Index:
        1. Description
        2. What gets listed for showing
        3. Usage
             i. On first installing
            ii. Editing your list
           iii. Checking your list
            iv. Posting your list
        4. Remove dropdown marker
    N O T E :-
                This file will be too large to view in the alert window
                that is opened by the "Help" option in the main context
                menu. So to read it in full you will have to choose the 
                "Edit" option and then click on the "Help" tab.
    D E S C R I P T I O N
    =====================
    The button produces an editable list of all your buttons which you would like to show using the "My Custom Buttoms" tab in your user profile.
    Once checked by you, you can paste the finished list into the text box there.
    W H A T   G E T S   L I S T E D   F O R   S H O W I N G
    =======================================================
    The button does not display duplicates of your buttons with an exactly matching name.
    The button does not display any of your buttons with ' test ' in the name. (Note that it is looking for a space before and after the word.)
    To check for possible duplicated buttons with similar names the button checks (in lower case) the first nn% of each button name and does not display those that match a button already listed.
    If your list still shows duplicates, or misses out a button that is NOT a duplicate - change dupcheckpercent. (Or change the name!) Otherwise simply edit the list as explained below.
    U S A G E
    =========
    On first installing
    ===================
    Because we will be posting your button image on the forum, then just as for posting a complete button, the button image MUST be in base64 format because I cannot load a local image file from your computer.
    IF you have any home made buttons that have a local filename showing in the "Image" box when you have the "Edit" window open - this button will show an alert message of the form:-
              "This button image is a local file on your computer"
              "ID = XX . . . Button_Name"
              "On toolbar:- This_Toolbar"
              "Please edit the button and click on the ->Base64 button to the 
              right of the image box and then click on "OK""
              "Then click this button again."
    The Button Archive List button will then read the list again and will, one by one, alert you about any other buttons that are using local filenames.
    Once all your buttons are using images in base64 format the LED in the bottom left corner of the Button Archive List button will turn from red to green.
    Your list is now ready to view and edit.
    Editing your list
    =================
    Once the LED on the button is green, just click on it to see the editable list of your buttons.
    Buttons that will be shown in your profile have a green background. Those that the Archive button thinks are duplicates will have a red background and these will not be shown.
    Click on any button entry to toggle it from "show" (green) to "don't show" (red).
    Changes you make will be slightly highlighted to help you keep track.
    When you are done - click on the "See final list" button at the bottom of the listing.
    Checking your list
    ==================
    Just to make sure, when you click on the "See final list" button you'll see a different drop down which will show you what the list in your profile will look like.
    If you want to make more changes click on the "Return to edit" button at the bottom of the list.
    If you are happy with the list as it is then click on the "Copy to clipboard" button.
    Posting your list
    =================
    After you have edited your list and copied it to the clipboard click on the "User Control Panel" link near the top of forum pages.
    Then click on the "My Custom Buttons" tab.
    Click inside the main text box there and then paste your list into it.  Again, as a final check you can use "Preview" to see what your list will look like.
    T O   R E M O V E   T H E   D R O P D O W N   M A R K E R
    =========================================================
    Place the following code in your userChrome.css which is in the Chrome folder of your profile. You'll need to edit it to have the correct number for this button (custombuttons-buttonXX). (Just open the context menu and click on the "Help" option and you should see the button ID# in the title).
    /* Remove button archive list dropdown */
    toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    M Y   S C R A T C H P A D   S H O U L D N ' T   B E   H E R E ! !
    =================================================================
    mykeystr=
    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    0123456789012345678901234567890123456789012345678901234567890
              1         2         3         4         5
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA <-- to here then next seven
    12x12  AwAAAAM_CAMAAABhq6zVAAAAB3RJTUUH2AQcFTAkJF
    16x16  BAAAAAQ_CAMAAAAoLQ9TAAAAB3RJTUUH
    24x24  BgAAAAY_CAMAAADXqc3KAAAAB3RJTUUH
    32x32  CAAAAAg_CAMAAABEpIrGAAAAB3RJTUUH2A
    32x16  CAAAAAQ_CAMAAABA3o1rAAAAB3RJTUUH2
    32x24  CAAAAAY_CAMAAACsjQ8GAAAAB3RJTUUH2A
    40x26  CgAAAAa_CAMAAADyku75AAAAB3RJTUUH2
    iVBORw0KGgoAAAANSUhEUgAAACgAAAAaCAMAAADyku75AAAAB3RJTU
    1st*16 + 2nd/4 + 3rd // width
    AwA = 12
    BAA = 16
    BgA = 24
    AAg = 32
    CAA = 32
    CAA = 32
    CgA = 32+8+0 = 40
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAA //APCA
    0123456789012345678901234567890123456789012345678901 //234567890
              1         2         3         4         5
    data:image/x-icon;base64,AAABAAEAICAAAAEACA <--next four - use last two
    dic16x16_AwAQ Aw=0(+*?)48/3=16  AQ=0*16+16=16 // forced to same width and height
    avk16x16_BoBA Bo=?              BA=1*16+0=16
    mse32x32_CoCA Co=?              CA=2*16+0=32
    key32x32_DoAg Do=?              Ag=0*16+32=32
    data:image/x-icon;base64,AAABAAEAICAAAAEACA
    0123456789012345678901234567890123456789012345678901 
              1         2         3         4         5
    data:image/gif;base64,R0lGODlh <--- then next four chars!
    white32x32 IAAg
    arrow FwAX  Fw=23  X=23
    loo FwAe  Fw=23 e=30  Fw= first char*4 + second char/16? F=5 w=48 5*4 + 48/16 = 23
    bg FgAM Fg=22  M=12   F=5 g=32  5*4 + 32/16 = 22 // width height
    mega KQAQ KQ=41 Q=16    K=10 Q=16     10*4 + 16/16 = 41 // width height
    data:image/gif;base64,R0lGODlh
    0123456789012345678901234567890123456789012345678
              1         2         3         4
    
  64. Button Archive ver 4.09 TIDY

    Code Tab

    /*Code*/
    // See the initialise tab for user options
    /* Using the Button Archive List button
       ====================================
        Click on any item to toggle it from:-
        Show button (green background)
        to
        Don't show button (red background)
        Once done, click on the "See final list" button at the 
        bottom of the menu to check your list before posting.
        In the (final) check list popup you can return to the edit list or
        copy your final list to the clipboard using the buttons at
        the bottom of the list.
    */
      this.togglecheck(event);
    

    Initialization Tab

    /*Initialization code*/
    /* +================  Start of user options ================+ */
    //
    // If all your buttons are not listed on startup you may need more than a four
    // second delay before the button list is built. Try adding a couple of seconds.
    var mywait = 4;
    //
    // When checking for possible duplicate button versions the button
    // looks at the first nn% of button names. (see "Help" tab for more)
    this.dupcheckpercent = 70;
    //
    // Menus should automatically refresh after being clicked on. If they don't
    // and you have to click the archive button again to see a menu try 
    // increasing the time. First to any small non-zero single digit, and if that
    // doesn't work start delay from 100 to perhaps 250 or even 500
    var showmenudelay = 0
    //
    // You can see the icons at real size or at a standard size...
    var realsize = true; // set to false for a standard 16x16
    //
    // You can see either colours, or ticks, or both
    // just set one or both to true or false
    var ticks = true;
    var colours = true;
    /* +================  End of user options ================+ */
    //this.setAttribute( 'onclick', 'gQuot( event, this )' ); 
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important;");
    var nextlist = "data:image/gif;base64,R0lGODlhGAAYAIcAAAF4tAN5tQR5tQR6tQV6tQd8tgh8tgl8twt+twx+tw1+txCAuBCAuRGBuRKBuRKBuhiEuxiFuxmFvBqFvByGvB2HvSOKviOKvySKvieMvyOMwCuOwSuQwy2Qwi6QwTCRwzKTxTSUxTeVxTaXyDuXxTqYxzyYxz2Yxj+Zxj6ayEWdykadyEedyUaey0eeykieyUify0qfyU6hy0yhzEuk0F2pz1ao0Vup0Vuq0luq01yu1mGr0GGt1GWt0Wau02Wv1Wqv02Sx12qw02qx1mqy12yx022z1m2z126012643Xa32nm623q62nq93n683H+83H7C5X/D5fpU+IC72YC93IG93YjA3InA3IvB3YvE343C3Y/D3pDE3pPF35PG34DD5YHD5YLD5YLE5YPE5YPF5YXD4oTF5YXF5YXG5obG5YfG5YbG5ojG5YjH5YnH5YjH54nH5orH5YrH5ovI5ozI5o3J547J54/J547K54/K543K6I7K6I/K6JDJ55DK55HK55HL55LK55LL55XI4JfI4JTL55XM6JbM6JfN6JnN55jN6JnN6JjO6JnO6JrO6JvP6JvP6ZzP6Z3P6ZrQ6pzQ6pzQ657Q6Z/Q6aLO46fQ5aDR6qLR6qPS6qLT7KTS6aTS6qXS6qXT6qbV7KrS5q7U56jU6qrV66zW7K7W7K7X7K/X7K/a7rDU57DV6LDX7LDa7rLY7LLb77bY6crj78Pj88Xj88Xk88/p9dPr9tjs9tjt9tzu9+bz+ef0+e/2+u/3+u/3+/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4EGFDB40AQBQAI+ECQRIQDBgg8QCjwQoIKIS4ggAARBwYOHlVoSJChoNGAADs=";
    var limit=10;
    var mPop;
    var seePop;
    var alertstring = "";
    var btn = "";
    var btnid = "";
    var btnimage = "";
    var btntip = "";
    var button_count;
    var btnhomepage = "";
    var buttonhead = "";
    var cb_count = 0;
    var cb_total = 0;
    var cbparent = "";
    var checkdata = "";
    var cliphead = "";
    var clipreport = "";
    var dontpush = false;
    var hidepadding = "#ffffff";
    var idx = 0;
    var indexstring = "";
    var itemcolour = "";
    var itemamber = "#e6dd76";
    var itemgreen = "#87a705"
    var itemred = "#f5cbcb";
    //var itemgreen = "#CBCDB4"
    //var itemred = "#E2E2DB";
    var itemlight = "";
    var itembrt = 0.99;
    var itemmed = 0.75; // .75
    var itemdim = 0.50; // .5
    var listcomplete = false;
    var makechange = false;
    var mybuttons;
    var mylabel = "";
    var name = "";
    var namecrop = "";
    var nameLC = "";
    var ontb = "";
    var rExp = "";
    var testreport = "";
    var teststr = "";
    var whilecount = 0;
    //imagecheck vars
    var imgstr = "";
    var chopstr = "";
    var mywidth = 0;
    var menupad = "";
    //use . _ l j at menupadarry[0][required pad width] to make the padding
    // l=2px j=3px .=4px _=6px
    var menupadarray = new Array();
    menupadarray.push(["","","l","j",".","jl","_",".j","..","jjj","._","..j","...",".j_","._.","...j",".__","._.j","___",".__j","._._",".j.j.j",".___","._._j","____","___.j","._.__"]);
    var mythis = this.getAttribute("id");
    mythis = document.getElementById(mythis);
    mywait = mywait * 1000;
    this.setAttribute("mylistdone", "false");
    mythis.setAttribute("seePopvisible", "false");
    this.setAttribute("base64missing", "false");
    this.tooltipText = "Button Archive List";
    this.image = listred;
    var btnarray = new Array();
    var cliparray = new Array();
        let nItem = function(label,value,name,img,btntip,namecrop,ontb,btn)
        {
          var mItem=document.createElement('menuitem');
          mItem.setAttribute('label',label);  // namecrop);
          mItem.value = value;
          mItem.tooltipText = "ID = " + btn + "    " + name;
          mItem.setAttribute('class','menuitem-iconic');
          mItem.setAttribute('image',img);
          mItem.setAttribute('name',name);
          return mItem;
        }
    /* +==================================================================
            L I S T   A L E R T   F U N C T I O N
       ==================================================================+ */
    mythis.listalert = function(evt)
    {
      // make the menupopup
       if(this.getAttribute("mylistdone") == "false")
       {
        mPop=document.createElement('menupopup');
        mPop.maxHeight = 400; // screen.availHeight - 50;
        mPop.maxWidth = 250;
        // end of make menupopup
      // reset btn array and cb_count
        btnarray = new Array();
        cb_count = 0;
        cb_total = 0;
      //  Obtain list of available buttons
        var buttons = document.getElementsByTagName("toolbarbutton");
        button_count = buttons.length;
      //  For each button find name and id#. 
      var i = 0;  
      for ( i = 1;  i < button_count;  i++  )
      {
        mybuttons = buttons[i];
        btnid = mybuttons.getAttribute("id");
        // Do a test for "custombuttons-buttonxxx"         
        // IF this Button is custom collect its details
        rExp = /custombuttons-button/;
        if (rExp.test(btnid)) // Our kind of custom button (thanks SCClockDr)
        {
          name = mybuttons.getAttribute("label");
          cb_total++ // full count of buttons
          // get the toolbar that the button is on
          ontb = mybuttons.parentNode.id;
          // cut for digits only
          btn = custombuttons.getNumber(btnid); // (thanks SCClockDr)
          btntip = btn
          // show button icons 
            btnimage = mybuttons.getAttribute("image");
            checkdata = btnimage.substring(0,8);
          // check to see if it is base 64
        this.setAttribute("base64missing", "false"); 
        var passimage = true ;
        // set up for alert if not a base64 image
        rExp = /base64/;
        if (!rExp.test(btnimage)) // file on local computer
        {
          passimage = false;
        }
        // reset to allow for xbitmaps such as the clock button
        rExp = /xbitmap/;
        if (rExp.test(btnimage))
        {
          passimage = true;
        }    
        if(passimage == false)
        {
              alertstring = "";
              alertstring = "This button image is a local file on your computer.\n\n";
              alertstring += "ID = " + btn + " . . . ";
              alertstring += name + "\n\n";
              alertstring += "On toolbar:- " + '"' + ontb + '"' + "\n\n";
              alertstring += "Please edit the button and click on the ";
              alertstring += "->Base64 button to the right of the image box \n";
              alertstring += "and then click on " + '"' + "OK" + '"' + ". \n\n";
              alertstring += "Then click this button again.\n\n";
              alertstring += "SEE the HELP tab for why you need to do this.";
              var mytitle = "Button Archive List - missing =>base64";
              var Msg = createMsg(mytitle);
              Msg.aMsg(alertstring);
              //alert(" " + alertstring);
              this.setAttribute("base64missing", "true");
              return;
        }
        // call the imagecheck function to create padding
        // for the various image types and sizes
        if(passimage == true)
        {
          imagecheck();
    /*
          rExp = /x-icon;base64/;
          if (rExp.test(btnimage)) // it's an icon
          {
            teststr += btnimage.substring(25,85) + " " + mywidth + " " + name + "\n";
          }
    */
          // assume a nominal max image width is 32 and desired space = 38
          // get the difference and create a pad string with . and _ and j
          // which are four and six and three pixels wide
          tmp = 38 - mywidth;
          // if no width then image type not covered
          if(mywidth == 0)
          {
            tmp = 4;
          }
          // correct for images larger than 38
          if(tmp < 4)
          {
            tmp = 4;
          }
          if(realsize == false)
          {
            tmp = 10;
          }
          menupad = menupadarray[0][tmp];
          // 
          //alert("name = " + name + "\n\nmywidth = " + mywidth);
          //return;
        }
          // manipulate name for sorting and listing
              nameLC = name.toLowerCase();
          // check for the word 'test' in the name(in lower case)
          rExp = / test /;
          if (rExp.test(nameLC)) // probable test button
          {
            dontpush = true; 
            //alert("dontpush test = " + dontpush);
          }
          // check for complete duplicate names
            var j = 0;
            for ( j = 0;  j < btnarray.length;  j++  )
            {
              if(name == btnarray[j][1])
              {
                dontpush = true; 
                //alert("dontpush duplicate = " + dontpush);            
              }
            } //end of duplicate names check
          // check for 'possible' duplicate names by percentage
          var tmpval = (nameLC.length * this.dupcheckpercent)/100; // length of compare string
          var tmpstr = nameLC.substring(0, tmpval);
            var k = 0;
            for ( k = 0;  k < btnarray.length;  k++  )
            {
              var tmpcheckstr = btnarray[k][0];
              var tmpcheckstrpc = tmpcheckstr.substring(0, tmpval);
              if(tmpstr == tmpcheckstrpc)
              {
                dontpush = true;
              }
            }  // end of percentage duplicate check   
          // find the homepage if there is one
            btnhomepage = mybuttons.getAttribute("homepage");
          // place in an array if all OK
              btnarray.push([nameLC,name,btn,btnimage,idx,ontb,btnhomepage,dontpush,menupad]);
              dontpush = false; // reset dontpush 
        }
      } //end of find custom buttons for array
      // sort on lower case name
      btnarray.sort(); 
        // add separator and "Click to see final list"
        btnarray.push(['separator',,,,,,,"carp"]);
        btnarray.push(["Click to see final list", "Click to see final list", "Click to see final list", nextlist, "", "", "", "carp"])
        // populate the start list
          makestartlist(); 
          this.appendChild(mPop);
          this.type = "menu";
          this.setAttribute("mylistdone", "true");
          mythis.setAttribute("seePopvisible", "false");
          this.image = listgreen;
      } // END of if my list done
    } // End list alert menu making
    /* +============= END OF MENU MAKING  =============+ */
    /* +==================================================================
            I M A G E   C H E C K   F U N C T I O N
       ==================================================================+ */
    function imagecheck()
    {
    mywidth = 0;
    var mykeystr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    //ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    //01234567890123456789012345678901234567890123456789012345678901234
    //          1         2         3         4         5         6
    // to check for a gif
    //
    // data:image/gif;base64,R0lGODlh <--- then next four chars! i.e. FgAM
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    // FgAM   width=Fg=22  height=AM=12   
    //
    // F=5 g=32  5*4 + 32/16 = 22 = width 
    //
    // A=0 M=12  0*16 + 12 = 12 = height
    // is it a gif?
    chopstr = "data:image/gif;base64,R0lGODlh";
    imgstr = "";
          rExp = /gif;base64/;
          if (rExp.test(btnimage)) // it's a gif
          {
            // if it's a gif get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by four (my width)
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // divide the index value of the second char by sixteen
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 16;
          } // END of check for gif
    // to check for an icon
    // 
    // data:image/x-icon;base64,AAABAA // use next four
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //EAEB = 16 = E*4 = 16
    //IAIC = 16 = I*4 /C = 16
    //IAEB = 16 = E*4 /B = 16
    //EAIC = 32 = I*4 = 32
    //EAQE = 64 = Q*4 = 64
    //
    //if first is I then divide by fourth
    // is it an icon?
    chopstr = "data:image/x-icon;base64,AAABAA";
    imgstr = "";
          rExp = /x-icon;base64/;
          if (rExp.test(btnimage)) // it's an icon
          {
            // if it's an icon get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the third char by four (my width)
            var tmpchar = imgstr.substring(2,3);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // if the first char is I then divide by fourth
            tmpcharcheck = imgstr.substring(0,1);
            if(tmpcharcheck == "I")
            {
              tmpchar = imgstr.substring(3,4);
              tmpidx = mykeystr.indexOf(tmpchar);
              mywidth = mywidth / tmpidx
            }
            //alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for icon
    // to check for a png
    // data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAA <-- to here then next four
    // 0123456789012345678901234567890123456789012345678901
    //           1         2         3         4         5
    // 
    //loo_AgCA  Ag=0*(?)+32=32   CA=2*16+0=32
    //cog_AgCA  
    //tls_APCA  AP=0*(?)+15=15   CA=2*16+0=32    //15x32 height width
    // is it a png?
    /*
    12x12  AwAAAAM_CAMAAABhq6zVAAAAB3RJTUUH2AQcFTAkJF
    16x16  BAAAAAQ_CAMAAAAoLQ9TAAAAB3RJTUUH
    24x24  BgAAAAY_CAMAAADXqc3KAAAAB3RJTUUH
    32x32  CAAAAAg_CAMAAABEpIrGAAAAB3RJTUUH2A
    32x16  CAAAAAQ_CAMAAABA3o1rAAAAB3RJTUUH2
    32x24  CAAAAAY_CAMAAACsjQ8GAAAAB3RJTUUH2A
    40x26  CgAAAAa_CAMAAADyku75AAAAB3RJTUUH2
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAaCAMAAADyku75AAAAB3RJTUUH2
    1st*16 + 2nd/4 + 3rd // width
    AwA = 12
    BAA = 16
    BgA = 24
    AAg = 32
    CAA = 32
    CAA = 32
    CgA = 32+8+0 = 40
    */
    chopstr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA"; // next seven
    imgstr = "";
          rExp = /png;base64/;
          if (rExp.test(btnimage)) // it's a png
          {
            // if it's a png get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 7);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by sixteen
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 16;
            // divide the index value of the second char by four
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 4;
            // add the index value of the third char
            tmpchar = imgstr.substring(2,3);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx;
          } // END of check for png
    // to check for a bmp
    //
    // data:image/bmp;base64,Qk3GBAAAAAAAADYEAAAoAAAA <--- then next seven chars
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //32x16 Qk02BgA_AAAAAADYEAAAoAAAAIA_AA_ABA_AAAABAAgAAAAAAAACAADCHgAAwh4AAAAAAA
    //32x24 Qk02BwA_AAAAAADYEAAAoAAAAIA_AA_ABg_AAAABAAgAAAAAAAADAADCHgAAwh4AAA
    //40x26 Qk1GCAA_AAAAAADYEAAAoAAAAKA_AA_ABo_AAAABAAgAAAAAABAEAADBHgAAwR4AAA
    //31x17 Qk1WBgA_AAAAAADYEAAAoAAAAHw_AA_ABE_AAAABAAgAAAAAACACAADCHgAAwh4AAA
    //
    //31x17 Hw= 7*4 + 48/16 = 28+3 = 31
    //31x17 BE= 1*16 + 4/4 = 16+1 = 17
    // is it a bmp?
    chopstr = "data:image/bmp;base64,Qk3GBAAAAAAAADYEAAAoAAAA";
    imgstr = "";
          rExp = /bmp;base64/;
          if (rExp.test(btnimage)) // it's a bmp
          {
            // if it's a bmp get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the first char by four (my width)
            var tmpchar = imgstr.substring(0,1);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 4;
            // divide the index value of the second char by sixteen
            tmpchar = imgstr.substring(1,2);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 16;
            //alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for bmp
    // to check for a jpg
    //
    //data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAA 
    // 0123456789012345678901234567890123456789012345678
    //           1         2         3         4
    // 
    //ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    //01234567890123456789012345678901234567890123456789012345678901234
    //          1         2         3         4         5         6
    //
    // 16x16 QABA  Q=16 + A = height  B*16 +  = width
    // 20x20 UABQ
    // 35x35 jACM
    // 40x33 hACg  h=33 + 0 = 40   C*16=32 + g/4=8  = 40 
    // 48x48 wADA
    // first two = height
    // is it a jpg?
    chopstr = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAA";
    imgstr = "";
          rExp = /jpeg;base64/;
          if (rExp.test(btnimage)) // it's a jpg
          {
            // if it's a jpg get the width (and height?) characters
            imgstr = btnimage.substring(chopstr.length, chopstr.length + 4);
            // use the key string index to get the value of the characters
            // multiply the index value of the third char by sixteen (my width)
            var tmpchar = imgstr.substring(2,3);
            var tmpidx = mykeystr.indexOf(tmpchar);
            mywidth = tmpidx * 16;
            // divide the index value of the fourth char by four
            tmpchar = imgstr.substring(3,4);
            tmpidx = mykeystr.indexOf(tmpchar);
            mywidth += tmpidx / 4;
            // alert("tmpchar = " + imgstr + " mywidth = " + mywidth);
          } // END of check for jpg
    } // END of image check
    /* +==================================================================
            M A K E   C H E C K   L I S T   F U N C T I O N
       ==================================================================+ */
    function makechecklist()
    {
          // used to turn OFF list changes for this menu in toggle check
          mythis.setAttribute("seePopvisible", "true");
      mythis.removeChild(mPop);
      seePop=document.createElement('menupopup');
      for(i=0; i<btnarray.length; i++) 
      {
        // check for a nopusharray entry (will skip adding to report if true)
        // reset dontpush
        dontpush = btnarray[i][7];
      // if no entry in nopusharray - add to report  
          if(dontpush == false)
          {
            if (btnarray[i][0] =='separator')
            {
              seePop.appendChild(document.createElement('menuseparator'));
            }
            else
            {
              var mytmpitem = seePop.appendChild(nItem(btnarray[i][1],btnarray[i][1],btnarray[i] [1], btnarray[i][3],"one","two","three",btnarray[i][2]));
      // call make new div to lay our div over the entry
      makenewdiv(mytmpitem,i);
        //
        //alert("this = " + this + "\n\nmytmpitem = " + mytmpitem);
        //return;
            } // END of if dontpush else
          }
      } // END of for loop
        // add the separator and the "buttons"
        var myitem = seePop.appendChild(document.createElement('menuseparator'));
        myitem = seePop.appendChild(nItem("Copy to clipboard","Copy to clipboard","Copy to clipboard", clipcopy));
        myitem.tooltipText = "Copy to clipboard"
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
        divwrap.setAttribute("style", "vertical-align: middle;  width: 250px; ");
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;");
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        imgnode.src = clipcopy;
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        namenode = document.createTextNode(" Copy to clipboard");
        spanname.appendChild(namenode);
        divwrap.appendChild(spanname);
        divwrap.style.background = itemamber;
        myitem.appendChild(divwrap);
        myitem = seePop.appendChild(nItem("Return to change items","Return to change items","Return to change items", backlist));
        myitem.tooltipText = "Return to change items"
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
        divwrap.setAttribute("style", "vertical-align: middle;  width: 250px; ");
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;");
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        imgnode.src = backlist;
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        namenode = document.createTextNode(" Return to change items");
        spanname.appendChild(namenode);
        divwrap.appendChild(spanname);
        divwrap.style.background = itemamber;
        myitem.appendChild(divwrap);
          mythis.appendChild(seePop);
          mythis.type = "menu";
    } // END of make check list
    /* +===== START OF EVENT CAPTURE FOR EDIT LIST =====+ */
    /* +==================================================================
            T O G G L E   C H E C K   F U N C T I O N
       ==================================================================+ */
    this.togglecheck = function(evt)
    {
        var alertindex = 0;
        alertstring = "";
        makechange = false;
        // keep the target object for later replace
        var toggletarget = evt.target;
        // find the button ID
        var alertindex = evt.target.value;
        // find that ID in btnarray to get the index number
          for (var i=0;i<btnarray.length;i++)
          {
            if (btnarray[i][1] == alertindex)
            {
              whilecount = i;
            }
          } 
      // Don't do this if the other menu is visible.
      if(mythis.getAttribute("seePopvisible") == "false")
      {
      // toggle the state of dontpush and the image
      //
      // Note to self: intercept "Click to see final list" here (and the separator?)
        if(btnarray[whilecount][7] == true)
        {
          btnarray[whilecount][7] = false;
          makechange = true;
          if(colours == true)
          {
            //itemcolour = itemgreen;
          }
        }
        else
        {
            if(btnarray[whilecount][7] == false)
            {
              btnarray[whilecount][7] = true;
              makechange = true;
              if(colours == true)
              {
                //itemcolour = itemred;
              }
           } 
        }
      // add the changed entry to the menu
      if(makechange == true)
      {
        // alert("making an entry change");
        var newentry = mPop.appendChild(nItem(btnarray[whilecount][1],btnarray[whilecount][1],btnarray[whilecount] [1], btnarray[whilecount][3],"one","two","three",btnarray[whilecount][2]));
      // call make new div to lay our div over the entry
      makenewdiv(newentry,whilecount);
      // replace the old one with the new
          mPop.replaceChild(newentry,toggletarget);
      // highlight it to show that it has been changed
          //newentry.style.opacity = itembrt;
          // to make the id unique - first add the index number
          indexstring = "[" + whilecount + "]" + btnarray[whilecount][1];
          newentry.id = indexstring;
      // show the menu again
      if(showmenudelay == 0)
      {
        mPop.showPopup();  
      }
      else
      {
        mydelay = setTimeout(function(){viewmpop()}, showmenudelay);
      }
      } // END of if make change is true
        if(btnarray[whilecount][1] == "Click to see final list")
        {
          makechecklist();
        }
      } // END of if seePop visible
        if(alertindex == "Copy to clipboard")
        {
         // call copytoclip after list editing!!!
          copytoclip();
        var mytitle = "Your button list is on the clipboard\n\n";
        alertstring = "You can paste the list into your button list area ";
        alertstring += "in your profile.\n\n";
        alertstring += 'Click on the link for "User control panel"\n\n';
        alertstring += 'Then click on the "My custom Buttons" tab';
        var Msg = createMsg(mytitle);
        Msg.aMsg(alertstring);
        } 
        if(alertindex == "Return to change items")
        {
          mythis.removeChild(seePop);
          mythis.appendChild(mPop);
          mythis.type = "menu";
          //mPop.showPopup();
          mydelay = setTimeout(function(){viewmpop()}, showmenudelay);
          this.setAttribute("seePopvisible", "false");  
        } 
      // set this way to show seePop on ANY click - covers clicks on items
      if(mythis.getAttribute("seePopvisible") == "true")
      {
        mydelay = setTimeout(function(){viewseepop()}, showmenudelay);
        //seePop.maxWidth = 250;
      }
    }// end of togglecheck function
    /* +===== END OF EVENT CAPTURE FOR EDIT LIST =====+ */
    /* +============= Call functions below here =============+ */
    /* +==================================================================
            M A K E   S T A R T   L I S T   F U N C T I O N
       ==================================================================+ */
    function makestartlist()
    {
      for (var i=0;i<btnarray.length;i++)
      {
          if (btnarray[i][0] =='separator')
          {
            mPop.appendChild(document.createElement('menuseparator'));
          }
          else
          {
            var myitem = mPop.appendChild(nItem(btnarray[i][1],btnarray[i][1],btnarray[i] [1], btnarray[i][3],"one","two",btnarray[i][5],btnarray[i] [2]));
        if(btnarray[i][1] == "Click to see final list")
        {
          myitem.tooltipText = "Click to see final list";
        }
      // overlay our own div onto the menu item
        makenewdiv(myitem,i);
         } // end of else
      } // end of for var
    } // END of function makestartlist
    /* +==================================================================
            C O P Y   T O   C L I P B O A R D   F U N C T I O N
       ==================================================================+ */
    function copytoclip()
    {  
      // reset
      clipreport = "";
      cb_count = 0;
      // build clipboard report
      for(i=0; i<btnarray.length; i++) 
      {
        // check for a nopusharray entry (will skip adding to report if true)
        // reset dontpush
        dontpush = btnarray[i][7];
      // if no entry in nopusharray - add to report  
          if(dontpush == false)
          {
              cb_count++; // might as well count them
            // check for a home page (make CB link if there is one, else just list it)
              if (btnarray[i][6])
              {
                clipreport += "[cb=" + btnarray[i][6] + "~-+" + btnarray[i][3] + "]";
                clipreport += btnarray[i][1] + "[/cb]\n";
              }
              else
              {
                clipreport +="[IMG]" + btnarray[i][3] + "[/IMG]" + " ";
                clipreport += btnarray[i][1] + "\n";
              }
          } // end of push to cliparray
       } // end of build clipboard report
      buttonhead = "[b]Total listed buttons = " + cb_count + "[/b] (of ";
      buttonhead += cb_total + " active)";
      buttonhead = buttonhead + "\n\n";
      cliphead = buttonhead;
      clipreport = cliphead + clipreport;        
      //  Output the report to clip board.
      custombuttons.gClipboard.write("");  // clear the clipboard
      custombuttons.gClipboard.write(clipreport);  // inserts text into the clipboard
    } // end of copytoclip function
    /* +==================================================================
            M A K E   N E W   D I V   F U N C T I O N
       ==================================================================+ */
    function makenewdiv(myitem, i)
    {
      // since the popup content is a bit limited we'll create our
      // own content and lay it on top of the existing stuff.
      //
      // Effectively sit a <div> in there...
      // but not for the see checklist entry
      var makediv = true;
      if(btnarray[i][1] == "Click to see final list")
      {
        makediv = false;   
      }
      if(makediv == true)
      {
      // first our own wrapper
        divwrap = document.createElementNS("http://www.w3.org/1999/xhtml","html:div");
          divwrap.setAttribute("style", "vertical-align: bottom;  width: 250px; "); 
          // opacity: 0.85; vertical-align: bottom; 
          //divwrap.onclick = function(evt){togglecheck(click)};
      // then add show/dontshow tick or cross image
      if(mythis.getAttribute("seePopvisible") == "false")
      {
      if(ticks == true)
      {
        ticknode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        ticknode.setAttribute("style", "vertical-align: bottom; "); 
        // vertical-align: bottom; background: red;
          if(btnarray[i][7] == true)
          {
            imgtick = cross;
          }
          if(btnarray[i][7] == false)
          {
            imgtick = tick;
          }
        ticknode.src = imgtick;
        divwrap.appendChild(ticknode);
      } // END of if ticks is true
      } // END of if seepop is visible
      // then add the button image
        spanimg = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanimg.setAttribute("style", "vertical-align: middle;  padding-top: 2px; padding-bottom: 2px;"); // HATES percentage for padding!!!!
        // vertical-align: middle; background: blue;
        imgnode = document.createElementNS("http://www.w3.org/1999/xhtml","html:img");
        imgnode.setAttribute("style", " padding-top: 2px; padding-bottom: 2px; vertical-align: middle;");
        // vertical-align bottom; background: green;
        imgnode.src = btnarray[i][3];
      // standardise?
        if(realsize == false)
        {
        imgnode.height = 16;
        imgnode.width = 16;
        }
      // centre images
        var tmpleft = parseInt((44 - imgnode.width)/2);
        var tmpright = 44 - (imgnode.width + tmpleft)
        tmpleft = tmpleft + "px";
        tmpright = tmpright + "px";
        imgnode.style.paddingLeft = tmpleft;
        imgnode.style.paddingRight = tmpright;
      // pad height of small images
        if(imgnode.height <= 16)
        {
          var tmptop = parseInt((24 - imgnode.height)/2);
          var tmpbottom = 24 - (imgnode.height + tmptop);
          tmptop = tmptop + "px";
          tmpbottom = tmpbottom + "px";
          imgnode.style.paddingTop = tmptop;
          imgnode.style.paddingBottom = tmpbottom;
        }
        spanimg.appendChild(imgnode);
        divwrap.appendChild(spanimg);
      // add the label (name)
        spanname = document.createElementNS("http://www.w3.org/1999/xhtml","html:span");
        spanname.setAttribute("style", " padding-top: 2px; vertical-align: middle; cursor: default;");
        // vertical-align: middle; background: yellow;
        // crop long names
        tmpnamecrop = btnarray[i] [1];
        if(tmpnamecrop.length > 35)
        {
          tmpnamecrop = tmpnamecrop.substring(0,35) + "...";
        }
        // add the text to the span
        namenode = document.createTextNode(" " + tmpnamecrop);
        spanname.appendChild(namenode);
        // add the span into the wrapper
        divwrap.appendChild(spanname);
      if(colours == true)
      {
      if(mythis.getAttribute("seePopvisible") == "false")
      {
        if(btnarray[i][7] == true) // don't push
        {
          divwrap.style.background = itemred;
        }
        if(btnarray[i][7] == false) // push
        {
          divwrap.style.background = itemgreen;
        }
      } // end of if seepop is not visible
      } // end of if colours true
      else
      {
          if(btnarray[i][1] == "Copy to clipboard")
          {
            divwrap.style.background = itemamber;
          }
          if(btnarray[i][1] == "Return to change items")
          {
            divwrap.style.background = itemamber;
          }
      } // end of if colours else
      if(mythis.getAttribute("seePopvisible") == "true");
      {
     //alert("seepop visible = ", + mythis.getAttribute("seePopvisible"));
        if(colours == true);
        {
          if(btnarray[i][1] == "Copy to clipboard")
          {
            divwrap.style.background = itemamber;
          }
          if(btnarray[i][1] == "Return to change items")
          {
            divwrap.style.background = itemamber;
          }
        } // end of if colours
      } // end of if seepop visible is true
      // and finally sit our own menuitem over the original
            myitem.appendChild(divwrap);
      } // END of if not click to see final list
    } // END of make new div
    var mydelay = setTimeout(function(){startlist()}, mywait);
    function startlist()
    {
      clearTimeout(mydelay);
      mythis.listalert();
    }
    // END of delay start
    // custombuttons.alertSlide("post setTimeout",this.listready);
    // Show the seePop after clicks on entries
    function viewseepop()
    {
        clearTimeout(mydelay);
        seePop.maxHeight = 400; // screen.availHeight - 50;
        // seePop.maxWidth = 250;
        seePop.showPopup();
    } // END of view the popup seepop
    function viewmpop()
    {
        clearTimeout(mydelay);
        mPop.maxHeight = 400; // screen.availHeight - 50;
        mPop.maxWidth = 250;
        mPop.showPopup();
    } // END of view the popup mpop
    //================ END ========================
    /*---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky", "SCClockDr");
    this.setAttribute('version','20080425.4.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/button-archive-list-user-profile.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true)
    

    Help Tab

    // +++============== Help for Button Archive ==================+++
    Index:
        1. Description
        2. What gets listed for showing
        3. Usage
             i. On first installing
            ii. Editing your list
           iii. Checking your list
            iv. Posting your list
        4. Remove dropdown marker
    N O T E :-
                This file will be too large to view in the alert window
                that is opened by the "Help" option in the main context
                menu. So to read it in full you will have to choose the 
                "Edit" option and then click on the "Help" tab.
    D E S C R I P T I O N
    =====================
    The button produces an editable list of all your buttons which you would like to show using the "My Custom Buttoms" tab in your user profile.
    Once checked by you, you can paste the finished list into the text box there.
    W H A T   G E T S   L I S T E D   F O R   S H O W I N G
    =======================================================
    The button does not display duplicates of your buttons with an exactly matching name.
    The button does not display any of your buttons with ' test ' in the name. (Note that it is looking for a space before and after the word.)
    To check for possible duplicated buttons with similar names the button checks (in lower case) the first nn% of each button name and does not display those that match a button already listed.
    If your list still shows duplicates, or misses out a button that is NOT a duplicate - change dupcheckpercent. (Or change the name!) Otherwise simply edit the list as explained below.
    U S A G E
    =========
    On first installing
    ===================
    Because we will be posting your button image on the forum, then just as for posting a complete button, the button image MUST be in base64 format because I cannot load a local image file from your computer.
    IF you have any home made buttons that have a local filename showing in the "Image" box when you have the "Edit" window open - this button will show an alert message of the form:-
              "This button image is a local file on your computer"
              "ID = XX . . . Button_Name"
              "On toolbar:- This_Toolbar"
              "Please edit the button and click on the ->Base64 button to the 
              right of the image box and then click on "OK""
              "Then click this button again."
    The Button Archive List button will then read the list again and will, one by one, alert you about any other buttons that are using local filenames.
    Once all your buttons are using images in base64 format the LED in the bottom left corner of the Button Archive List button will turn from red to green.
    Your list is now ready to view and edit.
    Editing your list
    =================
    Once the LED on the button is green, just click on it to see the editable list of your buttons.
    Buttons that will be shown in your profile have a green background. Those that the Archive button thinks are duplicates will have a red background and these will not be shown.
    Click on any button entry to toggle it from "show" (green) to "don't show" (red).
    Changes you make will be slightly highlighted to help you keep track.
    When you are done - click on the "See final list" button at the bottom of the listing.
    Checking your list
    ==================
    Just to make sure, when you click on the "See final list" button you'll see a different drop down which will show you what the list in your profile will look like.
    If you want to make more changes click on the "Return to edit" button at the bottom of the list.
    If you are happy with the list as it is then click on the "Copy to clipboard" button.
    Posting your list
    =================
    After you have edited your list and copied it to the clipboard click on the "User Control Panel" link near the top of forum pages.
    Then click on the "My Custom Buttons" tab.
    Click inside the main text box there and then paste your list into it.  Again, as a final check you can use "Preview" to see what your list will look like.
    T O   R E M O V E   T H E   D R O P D O W N   M A R K E R
    =========================================================
    Place the following code in your userChrome.css which is in the Chrome folder of your profile. You'll need to edit it to have the correct number for this button (custombuttons-buttonXX). (Just open the context menu and click on the "Help" option and you should see the button ID# in the title).
    /* Remove button archive list dropdown */
    toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    M Y   S C R A T C H P A D   S H O U L D N ' T   B E   H E R E ! !
    =================================================================
    mykeystr=
    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    0123456789012345678901234567890123456789012345678901234567890
              1         2         3         4         5
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA <-- to here then next seven
    12x12  AwAAAAM_CAMAAABhq6zVAAAAB3RJTUUH2AQcFTAkJF
    16x16  BAAAAAQ_CAMAAAAoLQ9TAAAAB3RJTUUH
    24x24  BgAAAAY_CAMAAADXqc3KAAAAB3RJTUUH
    32x32  CAAAAAg_CAMAAABEpIrGAAAAB3RJTUUH2A
    32x16  CAAAAAQ_CAMAAABA3o1rAAAAB3RJTUUH2
    32x24  CAAAAAY_CAMAAACsjQ8GAAAAB3RJTUUH2A
    40x26  CgAAAAa_CAMAAADyku75AAAAB3RJTUUH2
    iVBORw0KGgoAAAANSUhEUgAAACgAAAAaCAMAAADyku75AAAAB3RJTU
    1st*16 + 2nd/4 + 3rd // width
    AwA = 12
    BAA = 16
    BgA = 24
    AAg = 32
    CAA = 32
    CAA = 32
    CgA = 32+8+0 = 40
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAA //APCA
    0123456789012345678901234567890123456789012345678901 //234567890
              1         2         3         4         5
    data:image/x-icon;base64,AAABAAEAICAAAAEACA <--next four - use last two
    dic16x16_AwAQ Aw=0(+*?)48/3=16  AQ=0*16+16=16 // forced to same width and height
    avk16x16_BoBA Bo=?              BA=1*16+0=16
    mse32x32_CoCA Co=?              CA=2*16+0=32
    key32x32_DoAg Do=?              Ag=0*16+32=32
    data:image/x-icon;base64,AAABAAEAICAAAAEACA
    0123456789012345678901234567890123456789012345678901 
              1         2         3         4         5
    data:image/gif;base64,R0lGODlh <--- then next four chars!
    white32x32 IAAg
    arrow FwAX  Fw=23  X=23
    loo FwAe  Fw=23 e=30  Fw= first char*4 + second char/16? F=5 w=48 5*4 + 48/16 = 23
    bg FgAM Fg=22  M=12   F=5 g=32  5*4 + 32/16 = 22 // width height
    mega KQAQ KQ=41 Q=16    K=10 Q=16     10*4 + 16/16 = 41 // width height
    data:image/gif;base64,R0lGODlh
    0123456789012345678901234567890123456789012345678
              1         2         3         4
    
  65. Button Names List v5.3

    Code Tab

    /*Code*/
    /* See the Initialisation tab for customisation of such things as see icons,
       changing the cropwidth, report tab characters, time delay and more. */
    /* See the Help tab for usage and more customisation. */
    /* +================  End of user options ================+ */
    /* +====  Please do NOT change anything below this line, thanks.  ===+ */
    this.makealert(event);

    Initialization Tab

    /*Initialization code*/
    //
    // To turn off icons in the list change seeicons to false
        this.seeicons = true;  
    //
    // To change name width set var cropwidth (set to 0 for no cropping)
        this.cropwidth = 30;
    //
    // Set pad and column separators (Lines up text for those editors which cut
    // leading and trailing spaces. Set to spaces if your editor accepts them)
    this.padChar = "0"; // " " or "0"
    this.separator = "\t"; // "  " or "\t"
    //
    // If all your buttons are not listed on startup you may need more than a three
    // second delay before the button list is built. Try adding a couple of seconds.
    var mywait = 3;
    //
    // The code returns you to the button list after viewing the extra information
    // when you click on an item. Set backtolist to false to turn this off.
    var backtolist = true;
    /* See the help tab for usage and more customisation. */
    /* +================  End of user options ================+ */
    this.style.opacity = '.99';
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important;");
    // remove drop-down
    // toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    var nextlist = "data:image/gif;base64,R0lGODlhJgAmAIcAABsiMSAoOCMrPCQsPiUtPyUuQCYvQScwQygxRCkyRSozRys0SCw1SSw2Si03TC44TS85TjA6TzE7UTI8UjM9VDM+VTQ/VjVAWDZBWTdCWjhDXDpFXjpGXztHYTxIYj1JYz5KZD9LZkBMZ0FNaUFOakJPa0NQbURRbkVSb0ZTcUdUckhVc0hWdElXdktZe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TFypAkPBhNM6pAuFy1DAggIIGDBZ4MwCSfPbknC0oIEjgYEIBF3t/q6VhI0OBAxEIjPjxOPJHiUHcoAIHILCwQxACHabgYSkFBAA7";
    this.image = listred;
    var limit=10;
    var mPop;
    var alertstring = "";
    var btn = "";
    var btntip = "";
    var button_count = 0;
    var buttonhead = "";
    var cb_count = 0;
    var cbparent = "";
    var cliphead = "";
    var clipreport = "";
    var listready = "";
    var mybuttons = 0;
    var mytitle = "";
    var namecrop = "";
    var showme = "";
    var testreport = "";
    var teststr = "";
    var whilecount = 0;
    var btnarray = new Array();
    this.setAttribute("mylistdone", "false");
    var mythis = this.getAttribute("id");
    mythis = document.getElementById(mythis);
    mywait = mywait * 1000;
    mythis.listalert = function()
    {
       if(this.getAttribute("mylistdone") == "false")
       {
        let nItem = function(label,value,name,img,btntip,namecrop,ontb,btn)
        {
          var mItem=document.createElement('menuitem');
          mItem.setAttribute('label',namecrop);
          mItem.value = value;
          mItem.tooltipText = "ID = " + btn + "     " + label;
          mItem.setAttribute('class','menuitem-iconic');
          mItem.setAttribute('image',img);
          mItem.setAttribute('name',name);
          return mItem;
        }  
        mPop=document.createElement('menupopup');
      // reset btn array and cb_count
      btnarray = new Array();
      cb_count = 0;
      //  Obtain list of available buttons
      var buttons = document.getElementsByTagName("toolbarbutton");
      button_count = buttons.length
      //  For each button find name and id#. 
      for ( i = 1;  i < button_count;  i++  )
      {
        mybuttons = buttons[i];
        var btnid = mybuttons.getAttribute("id");
        // Do a test for "custombuttons-buttonxxx"         
        // IF this Button is custom collect its details
        let rExp = /custombuttons-button/;
        if (rExp.test(btnid)) // Our kind of button
        { 
          var name = mybuttons.getAttribute("label"); 
          var ontb = mybuttons.parentNode.id;
          cb_count++; // might as well count them
          // cut for digits only
          btn = custombuttons.getNumber(btnid); 
          var btntip = btn
          // manipulate name for sorting and listing
          var nameLC = name.toLowerCase();
          if (this.cropwidth !== 0)
          {
          var namecrop = name.substring(0, this.cropwidth);
            if (name.length > this.cropwidth)
            {
              namecrop += "...";
            }
          } 
          else
          {
            namecrop = name;
          }
          // show icons in menu
          if (this.seeicons == true)
          {        
            var btnimage = mybuttons.getAttribute("image");
          }
          // place in an array
        btnarray.push([nameLC,btn,btnimage,name,btntip,namecrop,ontb,btn]); 
        }
      } //end of find custom buttons for array
      // sort on lower case name
      btnarray.sort(); 
        // add separator and "Save to clipboard"
        btnarray.push(['separator',"one","two","three","four","five","six","carp"]);
        btnarray.push(["Save to clipboard", "Save to clipboard", nextlist, "Save to clipboard", "carp2", "Save to clipboard", "carp4", "Save to clipboard"])
      // Fill popup with button array
      mPop=document.createElement('menupopup');
      for (var i=0;i<btnarray.length;i++)
      {
          if (btnarray[i][0] =='separator')
          {
            mPop.appendChild(document.createElement('menuseparator'));
          }
          else
          {
        mPop.appendChild(nItem(btnarray[i] [3],btnarray[i] [1],btnarray[i] [1],btnarray[i][2],btnarray[i] [4], btnarray[i] [5], btnarray[i][6],btnarray[i][7]));
          }
      }
      this.appendChild(mPop);
      this.type = "menu";
      this.tooltipText = "CButtons count = " + cb_count;
      this.setAttribute("mylistdone", "true");
      this.image = listgreen;
      } // END of if !checked true
    } // END OF LISTALERT  
    /* +========== End menu making ========== */
    this.makealert = function(evt)
    {
      // Make an alert to give more button information when item is clicked
        var alertindex = 0;
        var alertstring = "";
        // find the button ID
        var alertindex = evt.target.value;
        // find that ID in btnarray to get the index number
      if(alertindex)
      {
        if(alertindex == "Save to clipboard")
        {
          this.copytoclip();
          mytitle = "Your button list is on the clipboard";
          alertstring += "Your list of buttons has been copied to the clipboard\n\n";
          alertstring += "Paste it into the text editor of your choice.\n\n";
          alertstring += "If your editor does[not] accept leading spaces you\n";
          alertstring += "can change them for zeros in the Code tab.";
        }
        else // main else
        {
          for (var i=0;i<btnarray.length;i++)
          {
            if (btnarray[i][1] == alertindex)
            {
              whilecount = i;
            }
          } 
      var tmp = btnarray[whilecount][1]; // get button ID
      alertstring += "ID = " + tmp + " . . . ";
      var getattribs = "custombuttons-button" + tmp; // get button attributes
      var btnattribs = document.getElementById(getattribs);
      tmp = btnarray[whilecount][3]; // get button name
      alertstring += tmp + "\n\n";
      alertstring +=  "On toolbar:- \t"
      tmp = btnarray[whilecount][6]; // get the toolbar the button is on
      alertstring += '"'+ tmp + '"' + "\n\n\n";
      // display chosen attributes
      alertstring += "Author = " + btnattribs.getAttribute("author") + "\n"
      alertstring += "Version = " + btnattribs.getAttribute("version") + "\n"
      alertstring += "Homepage = " + btnattribs.getAttribute("homepage") + "\n"  
      mytitle = "Selected button information";
        } // end of main else
        // write the message
        var Msg = createMsg(mytitle);
        Msg.aMsg(alertstring);
        // Use a small delay to allow the message window to clear 
        // before showing the popup menu
        if(backtolist == true)
        {
          mydelay = setTimeout(function(){viewmpop()}, 500);
        }
     } // END if alert index
    } // END OF MAKEALERT FUNCTION
    this.copytoclip = function()
    {
      custombuttons.gClipboard.write(""); // clear the clipboard
      clipreport = ""; // reset
      // leading zeros or spaces for text alignment
            for(i=0; i<btnarray.length; i++) 
            {
              if (btnarray[i][4].length <= 2){btnarray[i][4] = this.padChar + btnarray[i][4];}
              if (btnarray[i][4].length <= 2){btnarray[i][4] = this.padChar + btnarray[i][4];} 
            }
      for(i=0; i<btnarray.length-2; i++) // lose separator and clip button
      {
        clipreport += btnarray[i][4] + this.separator + btnarray[i][3] + "\n";
      } 
      buttonhead = "Total customised buttons = " + cb_count;
      this.tooltipText = buttonhead;
      buttonhead = buttonhead + "\n\n";
      cliphead = "clipreport" + " - " + buttonhead;
      if(this.padChar == "0")
      {
          cliphead += "Do NOT use leading zeros when using ID# in code.\n\n";
      }
      cliphead += "ID#" + this.separator + "Button Name:-" + "\n\n";
      clipreport = cliphead + clipreport;        
      //  Output the report to clip board.
      custombuttons.gClipboard.write(clipreport);  // inserts text into the clipboard
    } // END of copy to clipboard
    // Show the mPop after making the information message
    function viewmpop()
    {
        clearTimeout(mydelay);
        mPop.showPopup();
    } // END of view the popup mpop
    // Delay start of making the list to avoid timing issues
    var mydelay = setTimeout(function(){startlist()}, mywait);
    function startlist()
    {
      clearTimeout(mydelay);
      mythis.listalert();
    }
    // END of delay start
    // custombuttons.alertSlide("post setTimeout",this.listready);
    // = END ========================
    /* ---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky", "SCClockDr");
    this.setAttribute("version","20080408.5.3");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/buttons-names-list.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true)
    

    Help Tab

    // +++============== Help for Button List ==================+++
    Hover over any given name entry to see the ID# and button name.
    Click on any given name entry to see more information about that buttton.
    (Tip:- the message window will stay visible until closed by you and so will leave the ID# etc. available until you've finished using the information.)
    Change var seeicons from true to false to see or not see icons in the popup.
    Change var cropwidth to shorten or lengthen the length of the button name as shown in the menu. The full length name is shown in the tooltip and also in the alert and the clipboard text. Set cropwidth to zero if you do not wish to shorten the displayed name in the menu.
    The entire list is available on the clipboard
    =============================================
    Use the button at the bottom of the list. Just open any text based editor of your choice and paste into it.
    You can change the way the list lines up in your editor. If your editor will use spaces to pad out the numbers change the default pad settings from "0" and "\t" to a single space and a double space.
    To remove the drop down marker
    ==============================
    Place the following code in your userChrome.css which is in the Chrome folder of your profile. You'll need to edit it to have the correct number for your button (custombuttons-buttonXX) which, since you have this button, is now easy to find :-)
    /* Remove button list dropdown */
    toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    
  66. Button Names List v5.3

    Code Tab

    /*Code*/
    /* See the Initialisation tab for customisation of such things as see icons,
       changing the cropwidth, report tab characters, time delay and more. */
    /* See the Help tab for usage and more customisation. */
    /* +================  End of user options ================+ */
    /* +====  Please do NOT change anything below this line, thanks.  ===+ */
    this.makealert(event);

    Initialization Tab

    /*Initialization code*/
    //
    // To turn off icons in the list change seeicons to false
        this.seeicons = true;  
    //
    // To change name width set var cropwidth (set to 0 for no cropping)
        this.cropwidth = 30;
    //
    // Set pad and column separators (Lines up text for those editors which cut
    // leading and trailing spaces. Set to spaces if your editor accepts them)
    this.padChar = "0"; // " " or "0"
    this.separator = "\t"; // "  " or "\t"
    //
    // If all your buttons are not listed on startup you may need more than a three
    // second delay before the button list is built. Try adding a couple of seconds.
    var mywait = 3;
    //
    // The code returns you to the button list after viewing the extra information
    // when you click on an item. Set backtolist to false to turn this off.
    var backtolist = true;
    /* See the help tab for usage and more customisation. */
    /* +================  End of user options ================+ */
    this.style.opacity = '.99';
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important;");
    // remove drop-down
    // toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    var nextlist = "data:image/gif;base64,R0lGODlhJgAmAIcAABsiMSAoOCMrPCQsPiUtPyUuQCYvQScwQygxRCkyRSozRys0SCw1SSw2Si03TC44TS85TjA6TzE7UTI8UjM9VDM+VTQ/VjVAWDZBWTdCWjhDXDpFXjpGXztHYTxIYj1JYz5KZD9LZkBMZ0FNaUFOakJPa0NQbURRbkVSb0ZTcUdUckhVc0hWdElXdktZeE1be05cfE9eflJig1Vlh1ZmiFZniVdoilhpjFlqjVprjltsj11ukl5vk15wlV9xlmFzmWJ0mmN1m2R2nWV3nmZ4oGZ5oWd6omh7pGl8pWp9pmt+p2x/qW2Aqm2Bq26CrG+DrnCEr3GFsHKGsXOHs3SItHWJtXWKt3aLuHeMuXiNu3mOvHqPvXuQv3uRwHySwX2Tw36UxH6VxX+Wx4CXyIGYyYKZyoOazISbzYSczoWdz4ae0Yef0oig04mh1Iqi1ouj14yk2Iyl2o2m246n3I+o3pCp35Gq4JKr4ZOs45St5JWu5ZWv5paw55ex6Ziy6pmz65q07Ju17Zy27p2375648Z+58qC686G79KK89aO99qS+96a/96fA+KjB+anC+qrD+6zE+63F/K7G/a/H/bHI/bLJ/rTK/rXL/rfM/rjN/7rO/7vP/7zQ/77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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAP8ALAAAAAAeACAAAAj/AGkIHEiwoMGDA30AWciwocOHDnsIFDKkosWLGDNiBDJRCMSPDylW5EhDCA+EKAnysEhSiEeQMIGIHNJSo82bIzvGbDgzY8uTKVXebPlyp8yhOh8CABCz50+DACoCSLmSZdKGUYcwBel0osasWXFaLVmUIViGPTU+LQh2KY2qSMkqlSp1Kc6aGcHS1Rp241Wze/VuXShy7dKperUGHliV6MK2Ns8SzlnSYti+X316fZn4JtOulYHSiIo579uLHIPggFFCRIoaQcRKPWo1B4oYL0IYwKCjdF7NJEzMkLHhgYAVvi8Onsmxg4UTFypAkPBhNM6pAuFy1DAggIIGDBZ4MwCSfPbknC0oIEjgYEIBF3t/q6VhI0OBAxEIjPjxOPJHiUHcoAIHILCwQxACHabgYSkFBAA7";
    this.image = listred;
    var limit=10;
    var mPop;
    var alertstring = "";
    var btn = "";
    var btntip = "";
    var button_count = 0;
    var buttonhead = "";
    var cb_count = 0;
    var cbparent = "";
    var cliphead = "";
    var clipreport = "";
    var listready = "";
    var mybuttons = 0;
    var mytitle = "";
    var namecrop = "";
    var showme = "";
    var testreport = "";
    var teststr = "";
    var whilecount = 0;
    var btnarray = new Array();
    this.setAttribute("mylistdone", "false");
    var mythis = this.getAttribute("id");
    mythis = document.getElementById(mythis);
    mywait = mywait * 1000;
    mythis.listalert = function()
    {
       if(this.getAttribute("mylistdone") == "false")
       {
        let nItem = function(label,value,name,img,btntip,namecrop,ontb,btn)
        {
          var mItem=document.createElement('menuitem');
          mItem.setAttribute('label',namecrop);
          mItem.value = value;
          mItem.tooltipText = "ID = " + btn + "     " + label;
          mItem.setAttribute('class','menuitem-iconic');
          mItem.setAttribute('image',img);
          mItem.setAttribute('name',name);
          return mItem;
        }  
        mPop=document.createElement('menupopup');
      // reset btn array and cb_count
      btnarray = new Array();
      cb_count = 0;
      //  Obtain list of available buttons
      var buttons = document.getElementsByTagName("toolbarbutton");
      button_count = buttons.length
      //  For each button find name and id#. 
      for ( i = 1;  i < button_count;  i++  )
      {
        mybuttons = buttons[i];
        var btnid = mybuttons.getAttribute("id");
        // Do a test for "custombuttons-buttonxxx"         
        // IF this Button is custom collect its details
        let rExp = /custombuttons-button/;
        if (rExp.test(btnid)) // Our kind of button
        { 
          var name = mybuttons.getAttribute("label"); 
          var ontb = mybuttons.parentNode.id;
          cb_count++; // might as well count them
          // cut for digits only
          btn = custombuttons.getNumber(btnid); 
          var btntip = btn
          // manipulate name for sorting and listing
          var nameLC = name.toLowerCase();
          if (this.cropwidth !== 0)
          {
          var namecrop = name.substring(0, this.cropwidth);
            if (name.length > this.cropwidth)
            {
              namecrop += "...";
            }
          } 
          else
          {
            namecrop = name;
          }
          // show icons in menu
          if (this.seeicons == true)
          {        
            var btnimage = mybuttons.getAttribute("image");
          }
          // place in an array
        btnarray.push([nameLC,btn,btnimage,name,btntip,namecrop,ontb,btn]); 
        }
      } //end of find custom buttons for array
      // sort on lower case name
      btnarray.sort(); 
        // add separator and "Save to clipboard"
        btnarray.push(['separator',"one","two","three","four","five","six","carp"]);
        btnarray.push(["Save to clipboard", "Save to clipboard", nextlist, "Save to clipboard", "carp2", "Save to clipboard", "carp4", "Save to clipboard"])
      // Fill popup with button array
      mPop=document.createElement('menupopup');
      for (var i=0;i<btnarray.length;i++)
      {
          if (btnarray[i][0] =='separator')
          {
            mPop.appendChild(document.createElement('menuseparator'));
          }
          else
          {
        mPop.appendChild(nItem(btnarray[i] [3],btnarray[i] [1],btnarray[i] [1],btnarray[i][2],btnarray[i] [4], btnarray[i] [5], btnarray[i][6],btnarray[i][7]));
          }
      }
      this.appendChild(mPop);
      this.type = "menu";
      this.tooltipText = "CButtons count = " + cb_count;
      this.setAttribute("mylistdone", "true");
      this.image = listgreen;
      } // END of if !checked true
    } // END OF LISTALERT  
    /* +========== End menu making ========== */
    this.makealert = function(evt)
    {
      // Make an alert to give more button information when item is clicked
        var alertindex = 0;
        var alertstring = "";
        // find the button ID
        var alertindex = evt.target.value;
        // find that ID in btnarray to get the index number
      if(alertindex)
      {
        if(alertindex == "Save to clipboard")
        {
          this.copytoclip();
          mytitle = "Your button list is on the clipboard";
          alertstring += "Your list of buttons has been copied to the clipboard\n\n";
          alertstring += "Paste it into the text editor of your choice.\n\n";
          alertstring += "If your editor does[not] accept leading spaces you\n";
          alertstring += "can change them for zeros in the Code tab.";
        }
        else // main else
        {
          for (var i=0;i<btnarray.length;i++)
          {
            if (btnarray[i][1] == alertindex)
            {
              whilecount = i;
            }
          } 
      var tmp = btnarray[whilecount][1]; // get button ID
      alertstring += "ID = " + tmp + " . . . ";
      var getattribs = "custombuttons-button" + tmp; // get button attributes
      var btnattribs = document.getElementById(getattribs);
      tmp = btnarray[whilecount][3]; // get button name
      alertstring += tmp + "\n\n";
      alertstring +=  "On toolbar:- \t"
      tmp = btnarray[whilecount][6]; // get the toolbar the button is on
      alertstring += '"'+ tmp + '"' + "\n\n\n";
      // display chosen attributes
      alertstring += "Author = " + btnattribs.getAttribute("author") + "\n"
      alertstring += "Version = " + btnattribs.getAttribute("version") + "\n"
      alertstring += "Homepage = " + btnattribs.getAttribute("homepage") + "\n"  
      mytitle = "Selected button information";
        } // end of main else
        // write the message
        var Msg = createMsg(mytitle);
        Msg.aMsg(alertstring);
        // Use a small delay to allow the message window to clear 
        // before showing the popup menu
        if(backtolist == true)
        {
          mydelay = setTimeout(function(){viewmpop()}, 500);
        }
     } // END if alert index
    } // END OF MAKEALERT FUNCTION
    this.copytoclip = function()
    {
      custombuttons.gClipboard.write(""); // clear the clipboard
      clipreport = ""; // reset
      // leading zeros or spaces for text alignment
            for(i=0; i<btnarray.length; i++) 
            {
              if (btnarray[i][4].length <= 2){btnarray[i][4] = this.padChar + btnarray[i][4];}
              if (btnarray[i][4].length <= 2){btnarray[i][4] = this.padChar + btnarray[i][4];} 
            }
      for(i=0; i<btnarray.length-2; i++) // lose separator and clip button
      {
        clipreport += btnarray[i][4] + this.separator + btnarray[i][3] + "\n";
      } 
      buttonhead = "Total customised buttons = " + cb_count;
      this.tooltipText = buttonhead;
      buttonhead = buttonhead + "\n\n";
      cliphead = "clipreport" + " - " + buttonhead;
      if(this.padChar == "0")
      {
          cliphead += "Do NOT use leading zeros when using ID# in code.\n\n";
      }
      cliphead += "ID#" + this.separator + "Button Name:-" + "\n\n";
      clipreport = cliphead + clipreport;        
      //  Output the report to clip board.
      custombuttons.gClipboard.write(clipreport);  // inserts text into the clipboard
    } // END of copy to clipboard
    // Show the mPop after making the information message
    function viewmpop()
    {
        clearTimeout(mydelay);
        mPop.showPopup();
    } // END of view the popup mpop
    // Delay start of making the list to avoid timing issues
    var mydelay = setTimeout(function(){startlist()}, mywait);
    function startlist()
    {
      clearTimeout(mydelay);
      mythis.listalert();
    }
    // END of delay start
    // custombuttons.alertSlide("post setTimeout",this.listready);
    // = END ========================
    /* ---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky", "SCClockDr");
    this.setAttribute("version","20080408.5.3");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/buttons-names-list.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true)
    

    Help Tab

    // +++============== Help for Button List ==================+++
    Hover over any given name entry to see the ID# and button name.
    Click on any given name entry to see more information about that buttton.
    (Tip:- the message window will stay visible until closed by you and so will leave the ID# etc. available until you've finished using the information.)
    Change var seeicons from true to false to see or not see icons in the popup.
    Change var cropwidth to shorten or lengthen the length of the button name as shown in the menu. The full length name is shown in the tooltip and also in the alert and the clipboard text. Set cropwidth to zero if you do not wish to shorten the displayed name in the menu.
    The entire list is available on the clipboard
    =============================================
    Use the button at the bottom of the list. Just open any text based editor of your choice and paste into it.
    You can change the way the list lines up in your editor. If your editor will use spaces to pad out the numbers change the default pad settings from "0" and "\t" to a single space and a double space.
    To remove the drop down marker
    ==============================
    Place the following code in your userChrome.css which is in the Chrome folder of your profile. You'll need to edit it to have the correct number for your button (custombuttons-buttonXX) which, since you have this button, is now easy to find :-)
    /* Remove button list dropdown */
    toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    
  67. Button Names List v5.3

    Code Tab

    /*Code*/
    /* See the Initialisation tab for customisation of such things as see icons,
       changing the cropwidth, report tab characters, time delay and more. */
    /* See the Help tab for usage and more customisation. */
    /* +================  End of user options ================+ */
    /* +====  Please do NOT change anything below this line, thanks.  ===+ */
    this.makealert(event);

    Initialization Tab

    /*Initialization code*/
    //
    // To turn off icons in the list change seeicons to false
        this.seeicons = true;  
    //
    // To change name width set var cropwidth (set to 0 for no cropping)
        this.cropwidth = 30;
    //
    // Set pad and column separators (Lines up text for those editors which cut
    // leading and trailing spaces. Set to spaces if your editor accepts them)
    this.padChar = "0"; // " " or "0"
    this.separator = "\t"; // "  " or "\t"
    //
    // If all your buttons are not listed on startup you may need more than a three
    // second delay before the button list is built. Try adding a couple of seconds.
    var mywait = 3;
    //
    // The code returns you to the button list after viewing the extra information
    // when you click on an item. Set backtolist to false to turn this off.
    var backtolist = true;
    /* See the help tab for usage and more customisation. */
    /* +================  End of user options ================+ */
    this.style.opacity = '.99';
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important;");
    // remove drop-down
    // toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    var nextlist = "data:image/gif;base64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ebPlyp8yhOh8CABCz50+DACoCSLmSZdKGUYcwBel0osasWXFaLVmUIViGPTU+LQh2KY2qSMkqlSp1Kc6aGcHS1Rp241Wze/VuXShy7dKperUGHliV6MK2Ns8SzlnSYti+X316fZn4JtOulYHSiIo579uLHIPggFFCRIoaQcRKPWo1B4oYL0IYwKCjdF7NJEzMkLHhgYAVvi8Onsmxg4UTFypAkPBhNM6pAuFy1DAggIIGDBZ4MwCSfPbknC0oIEjgYEIBF3t/q6VhI0OBAxEIjPjxOPJHiUHcoAIHILCwQxACHabgYSkFBAA7";
    this.image = listred;
    var limit=10;
    var mPop;
    var alertstring = "";
    var btn = "";
    var btntip = "";
    var button_count = 0;
    var buttonhead = "";
    var cb_count = 0;
    var cbparent = "";
    var cliphead = "";
    var clipreport = "";
    var listready = "";
    var mybuttons = 0;
    var mytitle = "";
    var namecrop = "";
    var showme = "";
    var testreport = "";
    var teststr = "";
    var whilecount = 0;
    var btnarray = new Array();
    this.setAttribute("mylistdone", "false");
    var mythis = this.getAttribute("id");
    mythis = document.getElementById(mythis);
    mywait = mywait * 1000;
    mythis.listalert = function()
    {
       if(this.getAttribute("mylistdone") == "false")
       {
        let nItem = function(label,value,name,img,btntip,namecrop,ontb,btn)
        {
          var mItem=document.createElement('menuitem');
          mItem.setAttribute('label',namecrop);
          mItem.value = value;
          mItem.tooltipText = "ID = " + btn + "     " + label;
          mItem.setAttribute('class','menuitem-iconic');
          mItem.setAttribute('image',img);
          mItem.setAttribute('name',name);
          return mItem;
        }  
        mPop=document.createElement('menupopup');
      // reset btn array and cb_count
      btnarray = new Array();
      cb_count = 0;
      //  Obtain list of available buttons
      var buttons = document.getElementsByTagName("toolbarbutton");
      button_count = buttons.length
      //  For each button find name and id#. 
      for ( i = 1;  i < button_count;  i++  )
      {
        mybuttons = buttons[i];
        var btnid = mybuttons.getAttribute("id");
        // Do a test for "custombuttons-buttonxxx"         
        // IF this Button is custom collect its details
        let rExp = /custombuttons-button/;
        if (rExp.test(btnid)) // Our kind of button
        { 
          var name = mybuttons.getAttribute("label"); 
          var ontb = mybuttons.parentNode.id;
          cb_count++; // might as well count them
          // cut for digits only
          btn = custombuttons.getNumber(btnid); 
          var btntip = btn
          // manipulate name for sorting and listing
          var nameLC = name.toLowerCase();
          if (this.cropwidth !== 0)
          {
          var namecrop = name.substring(0, this.cropwidth);
            if (name.length > this.cropwidth)
            {
              namecrop += "...";
            }
          } 
          else
          {
            namecrop = name;
          }
          // show icons in menu
          if (this.seeicons == true)
          {        
            var btnimage = mybuttons.getAttribute("image");
          }
          // place in an array
        btnarray.push([nameLC,btn,btnimage,name,btntip,namecrop,ontb,btn]); 
        }
      } //end of find custom buttons for array
      // sort on lower case name
      btnarray.sort(); 
        // add separator and "Save to clipboard"
        btnarray.push(['separator',"one","two","three","four","five","six","carp"]);
        btnarray.push(["Save to clipboard", "Save to clipboard", nextlist, "Save to clipboard", "carp2", "Save to clipboard", "carp4", "Save to clipboard"])
      // Fill popup with button array
      mPop=document.createElement('menupopup');
      for (var i=0;i<btnarray.length;i++)
      {
          if (btnarray[i][0] =='separator')
          {
            mPop.appendChild(document.createElement('menuseparator'));
          }
          else
          {
        mPop.appendChild(nItem(btnarray[i] [3],btnarray[i] [1],btnarray[i] [1],btnarray[i][2],btnarray[i] [4], btnarray[i] [5], btnarray[i][6],btnarray[i][7]));
          }
      }
      this.appendChild(mPop);
      this.type = "menu";
      this.tooltipText = "CButtons count = " + cb_count;
      this.setAttribute("mylistdone", "true");
      this.image = listgreen;
      } // END of if !checked true
    } // END OF LISTALERT  
    /* +========== End menu making ========== */
    this.makealert = function(evt)
    {
      // Make an alert to give more button information when item is clicked
        var alertindex = 0;
        var alertstring = "";
        // find the button ID
        var alertindex = evt.target.value;
        // find that ID in btnarray to get the index number
      if(alertindex)
      {
        if(alertindex == "Save to clipboard")
        {
          this.copytoclip();
          mytitle = "Your button list is on the clipboard";
          alertstring += "Your list of buttons has been copied to the clipboard\n\n";
          alertstring += "Paste it into the text editor of your choice.\n\n";
          alertstring += "If your editor does[not] accept leading spaces you\n";
          alertstring += "can change them for zeros in the Code tab.";
        }
        else // main else
        {
          for (var i=0;i<btnarray.length;i++)
          {
            if (btnarray[i][1] == alertindex)
            {
              whilecount = i;
            }
          } 
      var tmp = btnarray[whilecount][1]; // get button ID
      alertstring += "ID = " + tmp + " . . . ";
      var getattribs = "custombuttons-button" + tmp; // get button attributes
      var btnattribs = document.getElementById(getattribs);
      tmp = btnarray[whilecount][3]; // get button name
      alertstring += tmp + "\n\n";
      alertstring +=  "On toolbar:- \t"
      tmp = btnarray[whilecount][6]; // get the toolbar the button is on
      alertstring += '"'+ tmp + '"' + "\n\n\n";
      // display chosen attributes
      alertstring += "Author = " + btnattribs.getAttribute("author") + "\n"
      alertstring += "Version = " + btnattribs.getAttribute("version") + "\n"
      alertstring += "Homepage = " + btnattribs.getAttribute("homepage") + "\n"  
      mytitle = "Selected button information";
        } // end of main else
        // write the message
        var Msg = createMsg(mytitle);
        Msg.aMsg(alertstring);
        // Use a small delay to allow the message window to clear 
        // before showing the popup menu
        if(backtolist == true)
        {
          mydelay = setTimeout(function(){viewmpop()}, 500);
        }
     } // END if alert index
    } // END OF MAKEALERT FUNCTION
    this.copytoclip = function()
    {
      custombuttons.gClipboard.write(""); // clear the clipboard
      clipreport = ""; // reset
      // leading zeros or spaces for text alignment
            for(i=0; i<btnarray.length; i++) 
            {
              if (btnarray[i][4].length <= 2){btnarray[i][4] = this.padChar + btnarray[i][4];}
              if (btnarray[i][4].length <= 2){btnarray[i][4] = this.padChar + btnarray[i][4];} 
            }
      for(i=0; i<btnarray.length-2; i++) // lose separator and clip button
      {
        clipreport += btnarray[i][4] + this.separator + btnarray[i][3] + "\n";
      } 
      buttonhead = "Total customised buttons = " + cb_count;
      this.tooltipText = buttonhead;
      buttonhead = buttonhead + "\n\n";
      cliphead = "clipreport" + " - " + buttonhead;
      if(this.padChar == "0")
      {
          cliphead += "Do NOT use leading zeros when using ID# in code.\n\n";
      }
      cliphead += "ID#" + this.separator + "Button Name:-" + "\n\n";
      clipreport = cliphead + clipreport;        
      //  Output the report to clip board.
      custombuttons.gClipboard.write(clipreport);  // inserts text into the clipboard
    } // END of copy to clipboard
    // Show the mPop after making the information message
    function viewmpop()
    {
        clearTimeout(mydelay);
        mPop.showPopup();
    } // END of view the popup mpop
    // Delay start of making the list to avoid timing issues
    var mydelay = setTimeout(function(){startlist()}, mywait);
    function startlist()
    {
      clearTimeout(mydelay);
      mythis.listalert();
    }
    // END of delay start
    // custombuttons.alertSlide("post setTimeout",this.listready);
    // = END ========================
    /* ---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky", "SCClockDr");
    this.setAttribute("version","20080408.5.3");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/buttons-names-list.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true)
    

    Help Tab

    // +++============== Help for Button List ==================+++
    Hover over any given name entry to see the ID# and button name.
    Click on any given name entry to see more information about that buttton.
    (Tip:- the message window will stay visible until closed by you and so will leave the ID# etc. available until you've finished using the information.)
    Change var seeicons from true to false to see or not see icons in the popup.
    Change var cropwidth to shorten or lengthen the length of the button name as shown in the menu. The full length name is shown in the tooltip and also in the alert and the clipboard text. Set cropwidth to zero if you do not wish to shorten the displayed name in the menu.
    The entire list is available on the clipboard
    =============================================
    Use the button at the bottom of the list. Just open any text based editor of your choice and paste into it.
    You can change the way the list lines up in your editor. If your editor will use spaces to pad out the numbers change the default pad settings from "0" and "\t" to a single space and a double space.
    To remove the drop down marker
    ==============================
    Place the following code in your userChrome.css which is in the Chrome folder of your profile. You'll need to edit it to have the correct number for your button (custombuttons-buttonXX) which, since you have this button, is now easy to find :-)
    /* Remove button list dropdown */
    toolbarbutton[id^="custombuttons-button18"] .toolbarbutton-menu-dropmarker { display: none !important }
    
  68. Button Post button

    Code Tab

    /*Button Post*/
    /*Code*/
    let Cb = custombuttons;
    let prompts  = Cc["@mozilla.org/embedcomp/prompt-service;1"].getService(Ci.nsIPromptService);
    let check  = {value: false };
    let sBtnNum  = {value: '' };
    let sTitle  = 'Build New Button Post';
    let sMsg  = 'Enter the Button\'s ID Numbrer';
    let lTest = prompts.prompt(null, sTitle, sMsg, sBtnNum, null, check);  // Button Name
    if ( String( Number( sBtnNum.value ) ) === 'NaN' ) {
      alert( 'You must Enter a number\n\nfor Button ID' );
      lTest = false ;
    }; // End if ( Number(sBtnNum.value) === 'NaN' )
    if ( lTest ) {
      this.oBtn = document.getElementById( 'custombuttons-button' + sBtnNum.value );
      Cb.alertSlide( "Posting ",this.oBtn.label  );
      let link = Cb.createLinks( CB2const.nClipbrd, this.oBtn );
      content.document.getElementById( "edit-field-tbuttons-0-value-field-tbutton-0-value" ).value = link;
      content.document.getElementById( "edit-title" ).value = this.oBtn.label;
      content.document.getElementById( "edit-body" ).value = this.oBtn.getAttribute( "help" ) || this.oBtn.getAttribute( "Help" );
      content.document.getElementById( "edit-taxonomy-tags-8" ).value = this.oBtn.getAttribute( 'author' );
      // Button Compatability
      let aOps = content.document.getElementById( "edit-taxonomy-2" ).getElementsByTagName("option");
      for (let i = 0; i < aOps.length; i++) {
        switch (aOps[i].value)
        {
        case "11826": // Minefield
        case "41":    // Firefox 3
        case "40":    // Firefox 2
        case "39":    // Firefox 1.5
        case "42":    // Flock 2
        case "48":    // Thunderbird 3
        case "49":    // Thunderbird 2
        case "11862": // Calendar 1
          aOps[i].selected = true;
          break;
        default :
          aOps[i].selected = false;
          break;
        } // End switch ( i )
      } // End for
      // Button Catagory
      aOps = content.document.getElementById( "edit-taxonomy-11" ).getElementsByTagName("option");
      for (let i = 0; i < aOps.length; i++) {
        switch (aOps[i].value)
        {
        case "17797":   // Other
          aOps[i].selected = true;
          break;
        default :
          aOps[i].selected = false;
          break;
        } // End switch ( i )
      } // End for
      // Revision History
      content.document.getElementById( "edit-log" ).value = "Initial Launch";
    } // End if ( lTest )
    /*=========================================================================================================================================*/
    

    Initialization Tab

    /*Initialization Code*/
    /*----------------------------------------------------
    	Function:  this.doDate( )
    	Args:	None
    	Returns:sD
    	Calls:	Date()
    		d.getMonth()	0 based
    		d.getDate()	1 based
    		d.getFullYear()	1 based
    ----------------------------------------------------*/
    this.doDate = function( ) {
    	var d = new Date();
    	var sD = d.getMonth()+1 +'/'+ d.getDate() +'/'+ d.getFullYear();
    	return sD;
    }; // End function this.doDate()
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author", "SCClockDr, deepakjoshi04" );
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.setAttribute("dependency","FF 2.*,CB 2.0.*");
    this.setAttribute("version","20090228.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/button-post-button.html');
    this.tooltipText += '\nLeft\t Prompt for Button Id:\n\tGenerate the post in the\n\topen Create Button page.';
    

    Help Tab

          This Button prompts for the button id # to post then auto fills several fields from the gathered data from the ID'd button.
    NOTE: Several fields may not be populated based on available data.
        * Additional buttons if a group post.
        * Additional Alt-Images. 
    They will need to be verified.
    Button or Button Set Name:
          Will be pulled from the Button's label Field.
    Description:
          Will be pulled from the Button's Help Field.
    Buttons:
        * First Button URL:
                Will be filled with the Button's Clipboard link. 
    The Vocabularies:
        * Author(s):
                Will be pulled from the Button's author Attribute. 
        * Button Catagory:
              o Others
          will be selected.
        * Button Compatibility:
              o Minefield
              o Firefox 3
              o Firefox 2
              o Firefox 1.5
              o Flock 2
          will be selected.
        * Select/Deselect items as appropriate. 
     Behavior:
       Left click - Prompts for the button ID to post and 
                    performs the field fill 
  69. CacheViewer

    Code Tab

    document.getElementById('more-tools-menu-CacheViewer').click();

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080914.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/cacheviewer-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  70. Calculator

    Code Tab

    /* Code */
    /*
    	Launches MS Calculator
    */

    Initialization Tab

    this.leftclick = function(evt){
    	this.startProcess('C:/Program Files/Microsoft Calculator Plus/CalcPlus.exe','');
    }
    this.rightclick = function(evt){
    	this.startProcess('C:/WINDOWS/system32/PowerCalc.exe','');
    	return;
    }
    // ****************    Put your Init functions here:  ****************************
    // ********************   Attribute code goes here   *****************************
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute("author","SCClockDr");							// Button Author
    this.setAttribute("version","20090204.01");
    this.setAttribute("dependency","Fx 2.0,Cb 0.0.02a");
    this.setAttribute("status","complete");
    this.setAttribute("public",true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/calculator.html');
    this.setAttribute("update","");
    this.tooltipText += "[L =  MS Calc | R = Power Calc]";
    

    Help Tab

    ***************************************************
      Left click  - Launches the Microsoft Calculator
      Right Click - Launches the Power Toys Calculator
                    if installed.
      
  71. Calculator

    Code Tab

    var calcul,reas,res,sago,floorres,strflores,strfloreslength,anzsho,PosNr=new Array(8),AnzeGrup=new Array(8),i,strinres,posdot,poslength,AnzGruppe0,AfDoGr=new Array(5);function run(){function gonow(){with(Math){reas=eval(calcul);res=abs(reas);floorres=floor(res);floorres>0?floorres=floorres:floorres=0; strflores=floorres.toString();strfloreslength=strflores.length;PosNr[0]=strfloreslength;i=0;while(i<8){i++;strfloreslength-3*i>0?PosNr[i]=strfloreslength-3*i:PosNr[i]=0 }i=0;while(i<8){i++;AnzeGrup[8-i]=strflores.slice(PosNr[i],PosNr[i-1]);AnzeGrup[8-i]>0?AnzeGrup[8-i]=' '+AnzeGrup[8-i]:'';}AnzeGrup[7]==0?AnzeGrup[7]=' 0':'';anzsho=AnzeGrup.join('');stringres=res.toString();posdot=stringres.indexOf('.');posdot>-1?afterdot=stringres.slice(posdot+1):afterdot=' ';afterdotlength=afterdot.length;i=-1;while(i<5){i++;AfDoGr[i]=afterdot.slice(3*(i),3*(i+1));if(AfDoGr[i]>0){if(i==0){AfDoGr[i]='.'+AfDoGr[i]}else{AfDoGr[i]=' '+AfDoGr[i]}}else{''}AfDoGr[0]=='000'?AfDoGr[0]='.'+AfDoGr[0]:'';}AnzGruppe0=AfDoGr.join('');if(res<1E21&&res>1e-14){rest=anzsho+AnzGruppe0;}if(res>=1E21&&reas>0){rest=res;}if(res>=1E21&&reas<0){rest=-res;}if(res <= 1e-14&&res>=0){rest=' 0';}if(reas==undefined ){rest=' '}}}function showit(){sago='Result:\n\n' +calcul+'  = '+ rest;calcul=window.prompt(sago, ' ');if(calcul==null){' '}else{gonow();showit();}}calcul=window.prompt('Calculate \:', ' ');if(calcul==null){' '}else{gonow();showit();}}run();

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','newf');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/calculator.html-0');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    null
  72. Case

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    this.leftclick   = function(evt){
      this.doLeft( evt );
    }
    this.midclick    = function(evt){
      this.doMid( evt );
    }
    this.rightclick  = function(evt){
      this.doRight( evt );
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      theBox: {},
      startPos: 0,
      endPos: 0,
      oPosition: 0,
      oHeight: 0,
      text: '',
      nHeight: 0,
      Highlight: '',
      eBlock: '',
      cBoard: '',
      n: '',
      nLen: 0,
      arr: [],
      initMeth: function( oBtn ){
        with( this ) {
          theBox  = document.commandDispatcher.focusedElement;
          if ( theBox ) {
            startPos = theBox.selectionStart;
            endPos = theBox.selectionEnd;
            oPosition = theBox.scrollTop;
            oHeight = theBox.scrollHeight;
            text = theBox.value.substring(0,startPos);
            nHeight = theBox.scrollHeight - oHeight;
            Highlight = theBox.value.substring(startPos, endPos);
            eBlock = theBox.value.substring(endPos, theBox.value.length);
            n = '';
            return true;
          } // End if ( this.theBox )
        } // End with( this )
        return false;
      } // End initMeth
    };
    /**  this.doLeft( e )
     Author:  George Dunham aka: SCClockDr
     Scope:      private
     Args:       e -
     Returns:    Nothing
     Called by:  1. this.leftclick
     Purpose:    1.
    **/
    this.doLeft = function( e ) //{{{
    {
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      with(x){
        text += Highlight.toUpperCase();
        nLen = text.length;
        text += eBlock;
        theBox.value = text;
        theBox.selectionStart = theBox.selectionEnd = nLen ;
        theBox.scrollTop = oPosition + nHeight;
      }
    }; //}}} End this.doLeft( e )
    /**  doMid( e )
     Author:  George Dunham aka: SCClockDr
     Scope:      private
     Args:       e -
     Returns:    Nothing
     Called by:  1. this.midclick
     Purpose:    1.
     TODO:       1.
    **/
    this.doMid = function( e ) //{{{
    {
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      with(x){
        text += Highlight.substr( 0, 1 ).toUpperCase();
        text += Highlight.substr( 1 ).toLowerCase();
        nLen = text.length;
        text += eBlock;
        theBox.value = text;
        theBox.selectionStart = theBox.selectionEnd = nLen ;
        theBox.scrollTop = oPosition + nHeight;
      }
    }; //}}} End doMid( e )
    /**  doRight( e )
     Author:  George Dunham aka: SCClockDr
     Scope:     private
     Args:      e -
     Returns:   Nothing
     Called by: 1. this.rightclick
     Purpose:   1.
    **/
    this.doRight = function( e ) //{{{
    {
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      with(x){
        text += Highlight.toLowerCase();
        nLen = text.length;
        text += eBlock;
        theBox.value = text;
        theBox.selectionStart = theBox.selectionEnd = nLen ;
        theBox.scrollTop = oPosition + nHeight;
      }
    }; //}}} End doRight( e )
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20090205.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/case.html');
    this.setAttribute('dependency','FF 2.0.0.4, CB² 2.0.0*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText += "\n L = UpperCase \n M = Capilalize \n R = LowerCase";
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    ***********************************************
    	This button operates on Highlighted text.
    	Right and Left click behavior is to convert the case of
      the entire highlighted string.
    	The Mid click behavior is to convert the entire string to
      lowercase and the first character to Uppercase.
    
  73. Center²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [cen'+'ter]Clipboard[/cen'+'ter]\n\nHTML: <'+'p style="text-align:ce'+'nter">Clipboard</'+'p>';
    this.ss = [
      { label: 'BBCode'  , open: '[center]'                     , open1: '[center]%h'                     , close: '[/cen'+'ter]', sItemId: '' },
      { label: 'HTML'    , open: '<'+'p style="text-align:cen'+'ter">', open1: '<'+'p style="text-align:cen'+'ter">%h', close: '</'+'p>'        , sItemId: '' },
      { label: 'WIKI N/A', open: ''                                   , open1: ''                                     , close: ''               , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function(oBtn){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          x.text += x.listo;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked=true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.cBoard) {
        alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
        return;
      }
      x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
      var nLen = x.n.length;
      x.text += x.n;
      x.theBox.value = x.text + x.eBlock;
      x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-justify-group.html');
    this.setAttribute('dependency','FF 2.0.*,  CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [center]Highlighted[/center]
    	 HTML: <p style="text-align:center">Highlighted</p>	
    	 WIKI N/A: 	
    	 OR nothing highlighted
    		 First click = [center] or <p style="text-align:center">	
    		 Second click = [/center] or </p>
     M =  ( Highlighted text will be replaced )
    	 BBCode: [center]Clipboard[/center]
    	 HTML: <p style="text-align:center">Clipboard</p>	
    		 Any Highlighted text will be REPLACED	
    	 WIKI N/A: 	
     R = Context Menu with tag options and submenu for CB Context
  74. changeCase

    Code Tab

    /*Code*/

    Initialization Tab

    this.changeCase = function(evt) {
      if(evt.shiftKey || evt.button==1) {
        this.showPopup(this);
        return;
      }
    var theBox = document.commandDispatcher.focusedElement;
    var startPos = theBox.selectionStart;
    var endPos = theBox.selectionEnd;
    var oPosition = theBox.scrollTop;
    var oHeight = theBox.scrollHeight;
    var nHeight = theBox.scrollHeight - oHeight;
    switch(evt.button) {
    case 0:
    var text=theBox.value.substring(0,startPos);
    text+=theBox.value.substring(startPos, endPos).toUpperCase();
    text +=theBox.value.substring(endPos, theBox.value.length);
    theBox.value = text;
    theBox.selectionStart = startPos ;
    theBox.selectionEnd = endPos ;
    theBox.scrollTop = oPosition + nHeight;
    break;
    case 1:
        this.showPopup(this);
    break;
        case 2:
    var text=theBox.value.substring(0,startPos);
    text+=theBox.value.substring(startPos, endPos).toLowerCase();
    text +=theBox.value.substring(endPos, theBox.value.length);
    theBox.value = text;
    theBox.selectionStart = startPos ;
    theBox.selectionEnd = endPos ;
    theBox.scrollTop = oPosition + nHeight;
    break;
    }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.changeCase(event);");
    this.setAttribute("context", "");
    this.tooltipText = "[L=UpperCase | M=Custom button Menu | R=LowerCase]";
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/change-case.html');

    Help Tab

  75. Charset Switcher

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    window.openDialog("chrome://charsetswitcher/content/prefs.xul", "CharsetSwitcherDialog", "chrome,centerscreen,dependent");
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/charset-switcher-button.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    null
  76. Check 'em All

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    var cb=custombuttons,self=this,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    function l(str) {
      self.properties = {
        en_US:{     // English US translation by nicholas
          Label:       "Check 'em All",
          All_1:       'all highlighted checkboxes',
          Check:       'Check %1',
          Uncheck:     'Uncheck %1',
          Toggle:      'Toggle states of %1',
          Left:        'L',
          Middle:      'M',
          Right:       'R',
          Help:        'Highlight a section of a page that contains checkboxes with your cursor then click the button.'+
                       '\n\n'+
                       'All of the checkboxes in the highlighted area will be toggled between a checked or unchecked state.'
        },
        nl:{        // Nederlandse vertaling doro markh
          Label:       "Alles aanvinken",
          All_1:       'alle geaccentueerde aanvinkvelden',
          Check:       '%1 aanvinken',
          Uncheck:     '%1 uitvinken',
          Toggle:      'Status van %1 wisselen',
          Left:        'L',
          Middle:      'M',
          Right:       'R',
          Help:        'Accentueer een gedeelte van een pagina met aanvinkvelden met uw cursor en klik op de knop.'+
                       '\n\n'+
                       'Alle aanvinkvelden in het geaccentueerde gebied worden gewisseld tussen aangevinkt en uitgevinkt.'
        },
        fr:{        // Traduction française de goofy@babelzilla.org
          Label:       "Cochez-les toutes !",
          All_1:       'toutes les cases à cocher sélectionnées',
          Check:       'Cocher %1',
          Uncheck:     'Décocher %1',
          Toggle:      'Cocher/décocher %1',
          Left:        'G',
          Middle:      'M',
          Right:       'D',
          Help:        'Sélectionnez au curseur une partie de page comprenant des cases à cocher puis cliquez sur le bouton.'+
                       '\n\n'+
                       'Toutes les cases à cocher de la zone sélectionnée seront cochées/décochées.'
        },
        ru:{     // Russian translation by Владимир Герасимов aka k78
          Label:       "Check 'em All",
          All_1:       'во всех выделенных чекбоксах',
          Check:       'Поставить флажки %1',
          Uncheck:     'Снять флажки %1',
          Toggle:      'Поменять флажки %1',
          Left:        'Левый клик',
          Middle:      'Средний клик',
          Right:       'Правый клик',
          Help:        'Курсором выделите секцию страницы с чекбоксами.'+
                       '\n\n'+
                       'Все чекбоксы в выделенной секции поменяют статус (отмеченные/неотмеченные) при нажатии кнопки.'
        }
      };
      var tstr = cb.getLocalString(self, str);
      // Operations to handle replacements
      if (tstr.match(/[%]\w{1}/g)) {
        lang = (typeof self.properties[lang] != "undefined") ? lang : "en_US";
        for(prop in self.properties[lang]) {
          if ((prop.match(/[_]\w{1}$/)) && ((prop.substr(prop.lastIndexOf("_")+1)) == (tstr.substring(tstr.indexOf("%")+1, tstr.indexOf("%")+2)))) {
            var tok = tstr.substring(tstr.indexOf("%"), tstr.indexOf("%")+2);
            tstr = tstr.replace(tok, l(prop));
          }
        }
      }
      return tstr;
    }
    var boxArray = new Array();
    function getSelectedSource() {
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var x = content.document.createElement("div");
      x.appendChild(winWrapper.getSelection().getRangeAt(0).cloneContents());
      return x;
    }
    function getBoxes() {
      var sel = getSelectedSource();
      var box = sel.getElementsByTagName('input');
      for (i=0;i<box.length;i++) {
        var boxtype = box[i].getAttribute("type");
        if (boxtype.match("checkbox")) {
          boxName = box[i].getAttribute("name");
          boxArray.push(boxName);
        }
      }
      return;
    }
    function checkBoxes() {
      getBoxes();
      for (j=0;j<boxArray.length;j++) {
        var getBox = content.document.getElementsByName(boxArray[j]);
        for (k=0;k<getBox.length;k++) {
          getBox[k].setAttribute("checked", "checked");
        }
      }
    }
    function uncheckBoxes() {
      getBoxes();
      for (j=0;j<boxArray.length;j++) {
        var getBox = content.document.getElementsByName(boxArray[j]);
        for (k=0;k<getBox.length;k++) {
          getBox[k].removeAttribute("checked");
        }
      }
    }
    function toggleBoxes() {
      getBoxes();
      for (j=0;j<boxArray.length;j++) {
        var getBox = content.document.getElementsByName(boxArray[j]);
        for (k=0;k<getBox.length;k++) {
          if (getBox[k].getAttribute("checked") == "checked") {
            getBox[k].removeAttribute("checked");
          }
          else {
            getBox[k].setAttribute("checked", "checked");
          }
        }
      }
    }
    this.leftclick = function(evt) {
      toggleBoxes();
    }
    this.midclick = function(evt) {
      checkBoxes();
    }
    this.cleftclick = function(evt) {
      checkBoxes();
    }
    this.rightclick = function(evt) {
      uncheckBoxes();
    }
    this.tooltipText = this.label + "\n" +
                       l("Left")+": "+l("Toggle")+"\n"+
                       l("Middle")+": "+l("Check")+"\n"+
                       l("Right")+": "+l("Uncheck")+"\n";
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20090604.00');
    this.setAttribute('dependency','FF3.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Beta');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/check-em-all-checkbox-button.html');

    Help Tab

    Highlight a section of a page that contains checkboxes
    with your cursor then click the button.
    All of the checkboxes in the highlighted area will
    be toggled between a checked or unchecked state.
  77. Checkbox Dialog Demo Button

    Code Tab

    /*Code*/

    Initialization Tab

    var cbArr = new Array();
    cbArr[0] = ["Apple", true];
    cbArr[1] = ["Banana", true];
    cbArr[2] = ["Carrot", true];
    var cbTtl = "My Title"; // Title of the dialog
    var cbLbl = "My Label"; // Label for the checkboxes area (displays above checkboxes)
    var cbHed = "My Header"; // A Header Box that displays near the top of the dialog
    var cbDsc = "My Description"; // The description for the Header Box.
    var cbAcc = "Accept"; // The text to show on your OK button (OK is used when not specified)
    var cbCnl = "Don't Accept"; // The text to show on your cancel button (Cancel is used when not specified)
    var cbHlp = "Help"; // The text to show on your Help button (This button does not show if no label is specified)
    var hlpTp = "Check the food that you like,\\n uncheck the ones you don't."; // Needed when clicking on the Help button
    var cbDis = "Disclosure"; // The text to show on your Disclosure button (This button does not show if no label is specified)
    var disTp = "Only use this button if you agree not to be stupid"; // Needed when clicking on the Disclosure button
    this.leftclick = function(evt) {
      // ********************* USAGE INFO ****************************** //
      // Any of the attributes in this function may be changed to null or removed if you don't want them
      // example: custombuttons.checkboxDialog(this,cbArr,null,null,cbHed,null...);
      // you must minimally use cus...(this,cbArr); you may also remove attributes completely,
      // but this requires that the order of the attributes is respected i.e.
      // custombuttons.checkboxDialog(this,cbArr,null,cbLbl); <-- notice all the missing attributes
      // *************************************************************** //
      var cbCheck = custombuttons.checkboxDialog(this,cbArr,cbTtl,cbLbl,cbHed,cbDsc,cbAcc,cbCnl,cbHlp,hlpTp,cbDis,disTp);
      if (cbCheck) {
        for(i = 0; i < cbArr.length; i++) {
          // this is where you can parse the array for all it's returned values
          alert(i + ": Do you like " + cbArr[i][0] + "s? " + cbArr[i][1]);
        }
      }
      else { // cancel or close was clicked
        return;
      }
    }
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.setAttribute('author','Rawny,nicholas');
    this.setAttribute('version','20081105.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL1.0*, TB2.0*, CB2 2.0.7.7*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Left%20click%20on%20the%20button%20to%20show%20the%20demo%20checkbox%20dialog.
  78. checkbox dialogue demo button

    Code Tab

    /*
        Essentially this can be classed as a demo button, I wrote it to learn how to make checkbox dialogues. 
        Turns out they're rather complicated...the dialogue needs an XUL file to specify what the dialogue contains and a JS file to contain any code that the dialogue runs (e.g. on a button click).
        Therefore this demo button has to create/write an XUL file and a JS file and then read the XUL file back in as the dialogue. 
        It's a long way to do it and since I wrote this, nicholas has added this code (heavily improved/modified) to the extension, see: 
        http://custombuttons2.com/wiki/documentation#CheckboxDialog
        I'm posting it in my collection in case anyone is learning to make custom dialogues and wants a passable example.
        (Left click on the button to show the demo checkbox dialogue.)
        Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    // This sets file to the profile directory
    var file = Components.classes["@mozilla.org/file/directory_service;1"]
                         .getService(Components.interfaces.nsIProperties)
                         .get("ProfD", Components.interfaces.nsIFile);
    // This is the array which are checkboxes will be based on.
    // The structure I'm using is: Arr[i] = [ID, Label, Checked];
    var Arr = new Array();
    Arr[0] = ["A", "Apple", true];
    Arr[1] = ["B", "Banana", true];
    Arr[2] = ["C", "Carrot", true];
    // (Initialising a couple of variables used later.)
    var WriteData = '';
    var XULData = '';
    /* 
      Below is the data that will be in the dialogues javascript file, it will look like this:
      function onOK() {
         window.arguments[0].out = {
            chosen:document.getElementsByAttribute("checked", true)
         };
         return true;
      }
    */
    var JSData = 'function onOK() {'+"\n"+'   window.arguments[0].out = {'+"\n"+'      chosen:document.getElementsByAttribute("checked", true)'+"\n"+'   };'+"\n"+'   return true;'+"\n"+'}';
    // ***** FUNCTIONS ***** //
    /* 
      The below function produces the data to be written into the dialogues XUL file. Checkboxes are added dynamically based on the contents of the 
      array. It will look something like this (using the default array values):
      <?xml version="1.0"?>
      <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
      <dialog
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        id="myDialogId"
        title="My Dialog"
        ondialogaccept="return onOK();"
        onload="onLoad();"
        persist="screenX screenY width height"
        windowtype ="myDialogWindowType">
      <script type="application/x-javascript" 
               src="file:///C:\Documents and Settings\...\Application Data\Mozilla\Firefox\Profile\...\cb_demo_checkbox_dialog.js"/>
      <checkbox id="A" checked="true" label="Apple"/>
      <checkbox id="B" checked="true" label="Banana"/>
      <checkbox id="C" checked="true" label="Carrot"/>
      </dialog>
    */
    function GenerateXUL()
    {
      XULData = '<?xml version="1.0"?>'+"\n"+'<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>'+"\n"+'<dialog'+"\n"+'  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"'+"\n"+'  id="myDialogId"'+"\n"+'  title="My Dialog"'+"\n"+'  ondialogaccept="return onOK();"'+"\n"+'  onload="onLoad();"'+"\n"+'  persist="screenX screenY width height"'+"\n"+'  windowtype ="myDialogWindowType">'+"\n"+"\n"+'<script type="application/x-javascript" src="'+JSLocation+'"/>'+"\n";
      var l = Arr.length;
      for (var i = 0; i < l; i++) {
        XULData = XULData + "\n"+'<checkbox id="'+Arr[i][0]+'" checked="'+Arr[i][2]+'" label="'+Arr[i][1]+'"/>';
      }
      XULData = XULData + "\n"+"\n"+'</dialog>';
    }
    // This simply writes whatever is in the variable "WriteData" to the file referred to by the variable "file".
    function WriteFile()
    {
      // file is nsIFile, data is a string
      var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
                               .createInstance(Components.interfaces.nsIFileOutputStream);
      // use 0x02 | 0x10 to open file for appending.
      foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0); 
      // write, create, truncate
      // In a c file operation, we have no need to set file mode with or operation,
      // directly using "r" or "w" usually.
      foStream.write(WriteData, WriteData.length);
      foStream.close();
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt)
    {
    // I believe this can be used to pass variables into the dialogue, as well as passing them out. 
    // I've not experimented with this, here I'm just initialising the output
      var params = {inn:null, out:null};
      var dlg = window.openDialog(location, "centersceen", "chrome, dialog, modal, resizable=no", params).focus();
      if (params.out) {
        alert('OK must have been pressed, because there was some output.');
    /* 
      This next section of code runs through the returned parameters and updates the array accordingly. It sets all the items in the array to 
      non-checked (Arr[k][2] = false;) or if an item was checked, it sets its checked property to true (Arr[n][2] = true;).
    */
        var pL = params.out.chosen.length;
        var aL = Arr.length;
        for (var k = 0; k < aL; k++) {
          Arr[k][2] = false;
        }
        for (var j = 0; j < pL; j++) {
          for (var n = 0; n < aL; n++) {
            if (Arr[n][0] == params.out.chosen[j].id) {
              Arr[n][2] = true;
            }
          }
        }
      }
      else {
        alert('Cancel (or close) must have been clicked, because there was no output.');
      }
    // This simply display the contents of the array.
      alert(Arr);
    // This re-writes the XUL file to reflect the changes to the array, so if you uncheck a checkbox it will be unchecked next time you open the dialogue.
      WriteData = '';
      GenerateXUL();
      file = Components.classes["@mozilla.org/file/directory_service;1"]
                       .getService(Components.interfaces.nsIProperties)
                       .get("ProfD", Components.interfaces.nsIFile);
      WriteData = XULData;
      file.append("cb_demo_checkbox_dialog.xul");
      location = "file:\/\/\/" + file.path;
      WriteFile();
    }
    // ***** INITIALISATION ***** //
    // Sets the file to be the dialogues JS file and writes it.
    file.append("cb_demo_checkbox_dialog.js");
    var JSLocation = "file:\/\/\/" + file.path;
    WriteData = JSData;
    WriteFile();
    // Sets the file to be the dialogues XUL file and writes it.
    WriteData = '';
    GenerateXUL();
    file = Components.classes["@mozilla.org/file/directory_service;1"]
                     .getService(Components.interfaces.nsIProperties)
                     .get("ProfD", Components.interfaces.nsIFile);
    WriteData = XULData;
    file.append("cb_demo_checkbox_dialog.xul");
    var location = "file:\/\/\/" + file.path;
    WriteFile();
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-rawny.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Left click on the button to show the demo checkbox dialogue.
  79. Checkbox Preference Toggler Button

    Code Tab

    /*Code*/

    Initialization Tab

    /*====================================================================*/
    /* START OF AREA NEEDING EDITING */
    /**/
    /**/  // NAME OF YOUR BUTTON (DO NOT REMOVE QUOTES)
    /**/    var name = '';
    /**/
    /**/  // PREFERENCE TO TOGGLE (DO NOT REMOVE QUOTES)
    /**/    var preF = ''; 
    /**/
    /**/  // PLACE VALUES FOR YOUR PREF HERE, (NO QUOTES NECESSARY)
    /**/  // BOOLEAN VALUES ARE TRUE/FALSE
    /**/  // INTEGER VALUES CAN BE ANY NUMBERS FOR TOGGLING BETWEEN
    /**/    var on = false;
    /**/    var off = true;
    /**/
    /**/    // do NOT edit the next two lines
    /**/      this.pref=preF;
    /**/      this.setState=function(){
    /**/    // end do NOT edit these two lines
    /**/
    /**/  // COMMENT OUT THE KIND OF PREFERENCE THIS IS NOT!
    /**/    var state=this.PS.getBoolPref(this.pref); // BOOLEAN
    /**/    //var state=this.PS.getIntPref(this.pref); // INTEGER
    /**/
    /* END OF AREA NEEDING EDITING */
    /*====================================================================*/
     if (state==off){
      this.checked=false;
     }else{
      this.checked=true;
     }
    }
    // TOGGLE FUNCTION FOR CHECK/UNCHECK
    this.leftclick   = function(evt){
    var prefValue = custombuttons.getPrefs(preF);
      if (prefValue == off) { custombuttons.setPrefs(preF,on); this.checked=false; }
      else { custombuttons.setPrefs(preF,off); this.checked=true; }
    }
    this.setAttribute('onclick', 'gQuot( event, this )'); // Calls the Global MouseClick handler gQuot
    // OBSERVES STATE OF PREFERENCE
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute('preference',preF);
    // BUTTON ATTRIBUTES
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080306.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/preference-toggle-button.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    // MAKES THIS A CHECKBOX BUTTON
    if ((!name) || (!preF)) {
      var err = "You must edit the Checkbox Preference Toggler Button with the correct values before you may use it";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';" 
      );
      return;
    } else {
    this.setAttribute("label",name);
    this.setAttribute("class","checkbox-check")
    this.setAttribute("btntype", "check");
    this.tooltipText = "Toggle " + name;
    this.setAttribute("style", "list-style-image: none !important; margin-bottom: 2px; margin-left: 4px; margin-right: 4px; margin-top: 2px; padding-bottom: 1px; padding-left: 4px; padding-right: 2px; padding-top: 1px; -moz-appearance: checkbox-container; -moz-box-align: center; -moz-binding: url(chrome://global/content/bindings/checkbox.xml#checkbox); -moz-box-orient: horizontal;");
    }

    Help Tab

    Check and Uncheck this button to toggle one's chosen preference.
      The value for the preference must be edited into the button as well as other things.
      Please edit the button and look for comments.
  80. Chrome Lockdown

    Code Tab

    /*Code*/

    Initialization Tab

    /******************************************************/
    /* INSERT YOUR PASSWORD BETWEEN THE QUOTES ("") BELOW */
    /******************************************************/
    /*                                                    */
           var userPassword = "";
           var editorPassword = "";
    /*                                                    */
    /******************************************************/
    // DISABLES BUTTON IF NOT COMPATIBLE WITH VERSION OF CB
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    // DISABLES BUTTON IF PASSWORDS DO NOT CONFORM
    else if (userPassword == "" || editorPassword == "" || (userPassword == editorPassword)) {
    	alert('You must edit the Toggle Chrome button with two unique passwords in order to use this button');
    	this.disable(true);
    }
    else hideChrome(); // HIDES CHROME IF PASSWORDS CONFORM
    // HIDES BROWSER CHROME
    function hideChrome() {
      if (navigator.platform == "Win32") {
        window.moveTo(0,0);
        window.maximize();
        document.getElementById("main-window").setAttribute('hidechrome','true');
        // preserve small area for taskbar to appear
        window.resizeTo(screen.availWidth, screen.availHeight);
      } else {
        document.getElementById("main-window").setAttribute('hidechrome','true');
        window.moveTo(0,0);
        window.resizeTo(screen.availWidth, screen.availHeight);
        window.maximize();
      }
    }
    // SHOWS BROWSER CHROME
    function showChrome() {
    if (navigator.platform == "Win32") {
    document.getElementById("main-window").setAttribute('hidechrome','false');
    window.resizeTo(screen.availWidth, screen.availHeight);
    window.maximize();
    window.resizeTo(screen.availWidth, screen.availHeight);
    } else {     
    document.getElementById("main-window").setAttribute('hidechrome','false');
    window.maximize();
    window.maximize();
    }
    }
    // TOGGLES BROWSER CHROME
    function toggleChrome() {
    var mainWindow = document.getElementById("main-window");
    var isFullScreen = mainWindow.getAttribute('hidechrome');
    if (isFullScreen == "" || isFullScreen == 'false') {
    hideChrome();
    } else {
    showChrome();
    }
    }
    // HIDES TOOLBARS
    function hideToolbars() {
      document.getElementById("toolbar-menubar").setAttribute("hidden", "true");
      document.getElementById("PersonalToolbar").setAttribute("hidden", "true");
    }
    hideToolbars();
    // SHOW TOOLBARS
    function showToolbars() {
      document.getElementById("toolbar-menubar").setAttribute("hidden", "false");
      document.getElementById("PersonalToolbar").setAttribute("hidden", "false");
    }
    // PROMPTS FOR PASSWORD
    this.promptPass = function() {
      var mainWindow = document.getElementById("main-window");
      var isFullScreen = mainWindow.getAttribute('hidechrome');
      if (isFullScreen == "" || isFullScreen == 'false') {
        hideChrome();
      } else {
        var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                               .getService(Components.interfaces.nsIPromptService);
        var input = {value:""};
        check = {value:false};
        okorcancel = prompts.promptPassword(window, 'Password to Minimize Window or Edit Button', 'Please insert your password...', input, '', check);
        if (input.value == userPassword) toggleChrome();
        else if (input.value == editorPassword) this.showPopup(this);
        else if (okorcancel == false) return;
        else if (input.value != userPassword || input.value != editorPassword) alert('Incorrect Password!\n\nYou may not access this feature without a valid password.');
      }
    }
    // SHOWS CB CONTEXT MENU
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.showHelp = function(btn) {
      //var bId = this.getNumber(btn.id);
      var str = btn.getAttribute("help").split(',')[1];
      if(!str) {str = cb2String.sOvrlyCB2buttonHelpstr;}
      alert(str);
    }
    this.setAttribute("onclick", "if (event.button == 0) this.promptPass(); else custombuttons.uChelpButton(this);");
    this.setAttribute("context", "");
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080306.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/chrome-lockdown.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/chrome-lockdown.html');

    Help Tab

    ********************************************************************        
     This Button Maximizes the window and hides the Operating System's Buttons.         
     The Button is password protected to keep users from minimizing and/or closing Firefox.        
    ********************************************************************        
     L = Prompts for Password        
           * User Password will toggle the window        
           * Editor Password will open the button's context menu for editing        
     R = Shows Help Message
  81. clean bookmarks

    Code Tab

    /*CÓDIGO*/
    var clean;
    clean = 'ass bitch butt cock cum dick dildo fuck galler hentai masturbate mgp naked nude porn puss serie sex strip suck teen tgp xxx';
    var Cc, Ci, bookmarksservice, historyservice;
    Cc = Components.classes;
    Ci = Components.interfaces;
    bookmarksservice = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Ci.nsINavBookmarksService);
    historyservice = Cc["@mozilla.org/browser/nav-history-service;1"]. getService(Ci.nsINavHistoryService);
    function termtoquery(term) {
        var query, folders;
        query = historyservice.getNewQuery();
        folders = [bookmarksservice.toolbarFolder, bookmarksservice.bookmarksMenuFolder, bookmarksservice.unfiledBookmarksFolder];
        query.setFolders(folders, folders.length);
        query.tags = ['notawesome'];
        query.tagsAreNot = true;
        query.searchTerms = term;
        return query;
    }
    var terms, term;
    var queries = new Array();
    terms = clean.split(' ');
    for (var i = 0; i < terms.length; i++) {
        term = terms[i];
        queries[i] = termtoquery(term);
    }
    var options, result, root, count, matchedterms;
    options = historyservice.getNewQueryOptions();
    options.queryType = options.QUERY_TYPE_BOOKMARKS;
    result = historyservice.executeQueries(queries, queries.length, options);
    root = result.root;
    root.containerOpen = true;
    count = root.childCount;
    matchedterms = count;
    function geturiobject(aURL, aOriginCharset, aBaseURI) {
        var ioservice;
        ioservice = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
        return ioservice.newURI(aURL, aOriginCharset, aBaseURI);
    }
    var taggingservice, node, title, uri, uriobject;
    taggingservice = Cc["@mozilla.org/browser/tagging-service;1"].getService(Ci.nsITaggingService);
    if (count) {
        for (var i = 0; i < count; i++) {
            try {
                node = root.getChild(i);
                title = node.title;
                uri = node.uri;
                uriobject = geturiobject(uri);
                taggingservice.tagURI(uriobject, ['notawesome']);
                i--;
            } catch (e) {}
        }
    }
    root.containerOpen = false;
    alert('Until current click, '+matchedterms+' new bookmarks had unwanted text in title or url, so they were tagged notawesome to not appear in the awesomebar.');

    Initialization Tab

    /*Código de inicialização*/
    if(typeof NotAwesome == 'undefined') {
      var ext = "NotAwesome";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.1';"
      );
      return;
    }
    this.setAttribute("author", 'Pedro Bessa');				// Stores Author.
    this.setAttribute("version", '1.2');                                   	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clean-bookmarks-button.html');		// Stores Dependency.
    this.setAttribute("status", 'Completed');				// Stores Devstatus.
    this.setAttribute("public", true);

    Help Tab

  82. clean history

    Code Tab

    /*CÓDIGO*/
    var clean;
    clean = 'ass bitch butt cock cum dick dildo fuck galler hentai masturbate mgp naked nude porn puss serie sex strip suck teen tgp xxx';
    var Cc, Ci, historyservice;
    Cc = Components.classes;
    Ci = Components.interfaces;
    historyservice = Cc["@mozilla.org/browser/nav-history-service;1"]. getService(Ci.nsINavHistoryService);
    function termtoquery(term) {
        var query;
        query = historyservice.getNewQuery();
        query.searchTerms = term;
        return query;
    }
    var terms, term;
    var queries = new Array();
    terms = clean.split(' ');
    for (var i = 0; i < terms.length; i++) {
        term = terms[i];
        queries[i] = termtoquery(term);
    }
    var options, result, root, count, matchedterms;
    options = historyservice.getNewQueryOptions();
    options.queryType = options.QUERY_TYPE_HISTORY;
    result = historyservice.executeQueries(queries, queries.length, options);
    root = result.root;
    root.containerOpen = true;
    count = root.childCount;
    matchedterms = count;
    function geturiobject(aURL, aOriginCharset, aBaseURI) {
        var ioService = Components.classes["@mozilla.org/network/io-service;1"].
                        getService(Components.interfaces.nsIIOService);
        return ioService.newURI(aURL, aOriginCharset, aBaseURI);
    }
    var node, title, uri, uriobject;
    if (count) {
        for (var i = 0; i < count; i++) {
            try {
                node = root.getChild(i);
                title = node.title;
                uri = node.uri;
                uriobject = geturiobject(uri);
                historyservice.removePage(uriobject);
                i--;
            } catch (e) {}
        }
    }
    root.containerOpen = false;
    var cleantoregexp, regexp, matchedhosts, cookieMgr, e, cookie, cookiehost, cookiename, cookiepath;
    cleantoregexp = clean.split(' ');
    cleantoregexp = cleantoregexp.join('|');
    regexp = new RegExp(cleantoregexp, 'i');
    matchedhosts = 0;
    cookieMgr = Components.classes["@mozilla.org/cookiemanager;1"]
                 .getService(Components.interfaces.nsICookieManager);
    e = cookieMgr.enumerator;
    while (e.hasMoreElements()) {
        cookie = e.getNext().QueryInterface(Components.interfaces.nsICookie); 
        cookiehost = cookie.host;
        cookiename = cookie.name;
        cookiepath = cookie.path;
        if (cookiehost.match(regexp)) {
            matchedhosts++;
            cookieMgr.remove(cookiehost, cookiename, cookiepath, false);
        }
    }
    alert('Until current click, '+matchedterms+' new pages in history had unwanted text in title or url and '+matchedhosts+' cookies in history had unwanted text in host, so they were deleted.');

    Initialization Tab

    /*Código de inicialização*/
    this.setAttribute("author", 'Pedro Bessa');				// Stores Author.
    this.setAttribute("version", '1.2');                                   	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clean-history-button.html');		// Stores Dependency.
    this.setAttribute("status", 'Completed');				// Stores Devstatus.
    this.setAttribute("public", true);

    Help Tab

  83. Clear Address Bar

    Code Tab

    /*Code*/

    Initialization Tab

    var cb=custombuttons,self=this;
    function l(str) {
      self.properties = {
        en_US:{      // English US translation by nicholas
          Label:       'Clear Address Bar',
          Help:        'Click the button to clear your address bar',
        },
      };
      var str = cb.getLocalString(self, str);
      return str
    }
    this.leftclick   = function(evt) {
      var urlbar = document.getElementById('urlbar');
      if (urlbar) {
        urlbar.value = "";
        urlbar.focus();
      }
      return
    }
    this.label = l("Label");
    this.setAttribute("Help", l("Help"));
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20090406.00');                                                 	// Stores Version.
    this.setAttribute("dependency",'FF 2.0,CB 2.0');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-fields.html');

    Help Tab

    Click the button to clear your address bar
  84. Clear Address Bar/Current Input Field/Search Bar

    Code Tab

    /*Code*/

    Initialization Tab

    var cb=custombuttons,self=this,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    function l(str) {
      self.properties = {
        en_US:{      // English US translation by nicholas
          Label:       '%1 %2/%3/%4',
          Left:        'L',
          Middle:      'M',
          Right:       'R',
          Clear:       '%1 ',
          Clear_1:     'Clear',
          ClearAdd:    '%1 %2',
          ClearInp:    '%1 %3',
          ClearSrc:    '%1 %4',
          AddressB_2:  'Address Bar',
          CurrInpF_3:  'Current Input Field',
          SearchB_4:   'Search Bar',
          Help:        'Shift+click: Custom Buttons² Context Menu',
        },
        ja:{         // 
          Left:        '左',
          Middle:      '中',
          Right:       '右',
        },
        fr_FR:{      // Traduction française fr par 
          Left:        'G',
          Middle:      'M',
          Right:       'D',
        },
        nl_NL:{      // Nederlandse vertaling door 
          Left:        'L',
          Middle:      'M',
          Right:       'R',
        },
        sv_SE:{      // 
          Left:        'V',
          Right:       'L',
        },
        es_ES:{      // 
          Left:        'I',
          Middle:      'M',
          Right:       'D',
        },
        es_AR:{      // 
          Left:        'I',
          Middle:      'M',
          Right:       'D',
        },
      };
      var tstr = cb.getLocalString(self, str);
      // Operations to handle replacements
      if (tstr.match(/[%]\w{1}/g)) {
        lang = (typeof self.properties[lang] != "undefined") ? lang : "en_US";
        for(prop in self.properties[lang]) {
          if ((prop.match(/[_]\w{1}$/)) && ((prop.substr(prop.lastIndexOf("_")+1)) == (tstr.substring(tstr.indexOf("%")+1, tstr.indexOf("%")+2)))) {
            var tok = tstr.substring(tstr.indexOf("%"), tstr.indexOf("%")+2);
            tstr = tstr.replace(tok, l(prop));
          }
        }
      }
      if (str == "Help") tstr = self.tooltipText+'\n'+tstr;
      return tstr;
    }
    this.leftclick   = function(evt) {
      var urlbar = document.getElementById('urlbar');
      if (urlbar) {
        urlbar.value = "";
        urlbar.focus();
      }
      return;
    }
    this.midclick    = function(evt) {
      var theBox = document.commandDispatcher.focusedElement;
      if (theBox) {
        theBox.value = "";
        var evt = document.createEvent("Events");
        evt.initEvent("oninput", true, true);
        theBox.dispatchEvent(evt);
        theBox.focus();
      }
      return;
    }
    this.rightclick  = function(evt) {
      var searchbar = document.getElementById('searchbar');
      if (searchbar) {
        searchbar.textbox.value = "";
        var evt = document.createEvent("Events");
        evt.initEvent("oninput", true, true);
        searchbar.dispatchEvent(evt);
        searchbar.focus();
      }
      searchbar = document.getElementById('MMSearchTBTextbox');
      if (searchbar) {
        searchbar.value = "";
        searchbar.focus();
      }
      return;
    }
    this.label = l("Label");
    this.tooltipText = l("Left")+": "+l("ClearAdd")+"\n"+l("Middle")+": "+l("ClearInp")+"\n"+l("Right")+": "+l("ClearSrc");
    this.setAttribute("Help", l("Help"));
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20090406.00');                                                 	// Stores Version.
    this.setAttribute("dependency",'FF 2.0,CB 2.0');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-fields.html');

    Help Tab

    L: Clear Address Bar
    M: Clear Current Input Field
    R: Clear Search Bar
    Shift+click: Custom Buttons² Context Menu
  85. Clear Cache

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    var cb=custombuttons,self=this,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    function l(str) {
      self.properties = {
        en_US:{      // English US translation by nicholas
          Label:       "Clear Cache",
          Prompt:      "Is it OK to completely clear your cache?",
          Help:        "Click the button to be prompted to clear your cache"
        },
        nl:{         // Nederlandse vertaling door markh
          Label:       "Cache opschonen",
          Prompt:      "OK om uw cache volledig op te schonen?",
          Help:        "Klik op de knop om gevraagd te worden of u uw cache wilt opschonen"
        },
        fr:{         // Traduction française de goofy@babelzilla.org
          Label:       "Nettoyer le cache",
          Prompt:      "Voulez-vous vraiment supprimer complètement les données de votre cache ?",
          Help:        "Cliquez sur le bouton et on vous demande si vous voulez nettoyer le cache."
        }
      };
      var tstr = cb.getLocalString(self, str);
      return tstr;
    }
    function clearCache() {
      auth=confirm(l("Prompt"));
      if (auth) {
        var classID = Components.classes["@mozilla.org/network/cache-service;1"];
        var cacheService = classID.getService(Components.interfaces.nsICacheService);
        cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY);
        cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK);
      }
      else return;
    }
    this.leftclick = function(evt) {
      clearCache();
    };
    this.label = l("Label");
    this.setAttribute("Help", l("Help"));
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20090407.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-cache.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    Click the button to be prompted to clear your cache
  86. Clear Cache (NO Prompt)

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    var cb=custombuttons,self=this,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    function l(str) {
      self.properties = {
        en_US:{     // English US translation by nicholas
          Label:       "Clear Cache (NO Prompt)",
          Help:        "  Left Click:"+
                       "\n"+
                       "    Displays Help"+
                       "\n"+
                       "  Left Double Click:"+
                       "\n"+
                       "    Clears the Browser's Cache Without a prompt"
        },
        nl:{        // Nederlandse vertaling door markh
          Label:       "Cache opschonen (NIET vragen)",
          Help:        "  Klik:"+
                       "\n"+
                       "    Geeft hulp weer"+
                       "\n"+
                       "  Dubbelklik:"+
                       "\n"+
                       "    Schoont de cache van de browser op zonder te vragen"
        },
       fr:{          // Traduction française de goofy@babelzilla.org
           Label:       "Nettoyer le cache (SANS confirmation)",
           Help:        "  Clic gauche:"+
                        "\n"+
                        "    Afficher l'aide"+
                        "\n"+
                        "  Double clic gauche:"+
                        "\n"+
                        "    Supprime les données du cache sans vous demander confirmation"
         }
      };
      var tstr = cb.getLocalString(self, str);
      return tstr;
    }
    var Msg = createMsg(this.label);
    let Cb2s = cb2String;
    this.leftclick = function(evt) {
      custombuttons.uChelpButton( this );
    };
    this.leftDclick = function(evt) {
      this.clearCache();
    };
    this.clearCache = function() {
      let classID = Cc["@mozilla.org/network/cache-service;1"];
      let cacheService = classID.getService(Ci.nsICacheService);
      cacheService.evictEntries(Ci.nsICache.STORE_IN_MEMORY);
      cacheService.evictEntries(Ci.nsICache.STORE_ON_DISK);
    };
    this.label = l("Label");
    this.setAttribute("Help", l("Help"));
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas, PaulFox, SCClockDr');
    this.setAttribute('version','Version 20090407.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-cache-no-prompt.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

      Left Click:
        Displays Help
      Left Double Click:
        Clears the Browser's Cache Without a prompt
  87. Clear Downloads

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler --------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      gDownloadViewController.doCommand('cmd_cleanUp');
    };
    this.midclick = function(evt)
    {
      BrowserDownloadsUI();
    };
    this.rightclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20080218.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-download-manager.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText += '\n L: Clear DLs  M: Open DL Mgr.  R: Menu';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-download-manager.html');

    Help Tab

    /*Help*/
    Left:	Clear Download Manager
    Middle:	Open Download Manager
    Right:	Custom Buttons² Context Menu
  88. Clear Downloads - db

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler --------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      db_clearAll();
    };
    this.midclick = function(evt)
    {
      BrowserDownloadsUI();
    };
    this.rightclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20080218.01db');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-download-manager.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*, Dowload Statusbar');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText += '\n L: Clear DLs  M: Open DL Mgr  R: Context Menu ';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-download-manager.html');

    Help Tab

    /*Help*/
    This button works with the "Download Statusbar" extension(required).
          https://addons.mozilla.org/firefox/26/
    Left:	Clear Download Manager
    Middle:	Open Download Manager
    Right:	Custom Buttons² Context Menu
  89. Clear Input Field

    Code Tab

    /*Code*/

    Initialization Tab

    var cb=custombuttons,self=this;
    function l(str) {
      self.properties = {
        en_US:{      // English US translation by nicholas
          Label:       'Clear Input Field',
          Help:        'Click the button to clear the current input field',
        },
      };
      var str = cb.getLocalString(self, str);
      return str
    }
    this.leftclick   = function(evt) {
      var theBox = document.commandDispatcher.focusedElement;
      if (theBox) {
        theBox.value = "";
        var evt = document.createEvent("Events");
        evt.initEvent("oninput", true, true);
        theBox.dispatchEvent(evt);
        theBox.focus();
      }
      return;
    }
    this.label = l("Label");
    this.setAttribute("Help", l("Help"));
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20090406.00');                                                 	// Stores Version.
    this.setAttribute("dependency",'FF 2.0,CB 2.0');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-fields.html');

    Help Tab

    Click the button to clear the current input field
  90. Clear Search Bar

    Code Tab

    /*Code*/

    Initialization Tab

    var cb=custombuttons,self=this;
    function l(str) {
      self.properties = {
        en_US:{      // English US translation by nicholas
          Label:       'Clear Search Bar',
          Help:        'Click the button to clear your search bar',
        },
      };
      var str = cb.getLocalString(self, str);
      return str
    }
    this.leftclick   = function(evt) {
      var searchbar = document.getElementById('searchbar');
      if (searchbar) {
        searchbar.textbox.value = "";
        var evt = document.createEvent("Events");
        evt.initEvent("oninput", true, true);
        searchbar.dispatchEvent(evt);
        searchbar.focus();
      }
      return
    }
    this.label = l("Label");
    this.setAttribute("Help", l("Help"));
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20090406.00');                                                 	// Stores Version.
    this.setAttribute("dependency",'FF 2.0,CB 2.0');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clear-fields.html');

    Help Tab

    Click the button to clear your search bar
  91. clickAny

    Code Tab

    var b=document.getElementsByTagName("toolbarbutton");
    var bName="silentButton";
    for(var i=0;i<b.length;i++)
    {
    	if(b[i].name==bName)
    	{
    		b[i].click();
    		break;
    	}
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clickany-button.html');

    Help Tab

  92. Clipboard

    Code Tab

    /*Code*/

    Initialization Tab

    var mp;
    removeNode=function(aNode)
    {
    	mp.removeChild(aNode);
    	reAssignId();
    }
    function reAssignId()
    {
    	var NL=mp.childNodes;
    	for(var i=0;i<NL.length;i++)
    	{
    		mp.removeChild(NL[i].id=i+1);
    	}
    }
    function addMenuItem(aNode, aLabel, aContextId, aCommand) {
       var mi = aNode.appendChild(document.createElement("menuitem"));
       mi.setAttribute("label", aLabel);
       mi.setAttribute("id",aNode.childNodes.length);
      if(aContextId) mi.setAttribute("context", aContextId);
      if(aCommand) mi.setAttribute("oncommand", aCommand);
    }
    var contextId = "popup-item-clipping";
    var test = document.getElementById(contextId);
    if(test) test.parentNode.removeChild(test);
    var mainPopup = document.getElementById("mainPopupSet");
    var context = mainPopup.appendChild(document.createElement("popup"));
    context.id = contextId;
    addMenuItem(context, "Remove Item?", null,
      "closeMenus(document.popupNode); " +
      "removeNode(document.popupNode);");
    var popupItems = ["Deepak", "Joshi","deepakjoshi04@yahoo.com","deepakjoshi04"];
    mp = this.appendChild(document.createElement("menupopup"));
    mp.setAttribute("oncommand", "paste(event.target.label)");
    for(var i = 0; i < popupItems.length; i++) {
      addMenuItem(mp, popupItems[i], contextId);
    }
    this.add=function(evt)
    {
    if(evt.target.value==-1)
    addMenuItem(mp,readFromClipboard(),contextId);
    }
    paste=function(text)
    {
    	var theBox = document.commandDispatcher.focusedElement;
    	theBox.value = text;
    }
    this.setAttribute("oncommand", "this.add(event);");
    this.type = "menu-button";
    this.value=-1;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/your-clipboard-button-fill-forms.html');

    Help Tab

  93. Clipboard Cleaner

    Code Tab

    var clip = Components.classes["@mozilla.org/widget/clipboard;1"].getService(Components.interfaces.nsIClipboard);
    if (!clip) return;
    var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
    if (!trans) return;
    trans.addDataFlavor("text/unicode");
    clip.getData(trans,clip.kGlobalClipboard);
    var str = new Object();
    var strLength = new Object();
    trans.getTransferData("text/unicode",str,strLength);
    if (str) str = str.value.QueryInterface(Components.interfaces.nsISupportsString);
    if (str) {
     var newtrans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
     newtrans.addDataFlavor("text/unicode");
     newtrans.setTransferData("text/unicode", str, strLength.value);
     clip.setData(newtrans,null,Components.interfaces.nsIClipboard.kGlobalClipboard);
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clipboard-cleaner-joseprio.html');

    Help Tab

  94. Clippings Menu

    Code Tab

    this.siteGo(event);

    Initialization Tab

    var limit=10;
    var mPop;
    var img=this.image;
    var apps=new Array;
    apps.push(['Full Name','InsertFullNameHere',img]);
    apps.push(['First Name','InsertFirstNameHere',img]);
    apps.push(['Last Name','InsertLastNameHere',img]);
    apps.push(['separator']);
    apps.push(['Address','InsertAddressHere',img]);
    apps.push(['City','InsertCityHere',img]);
    apps.push(['State','InsertStateHere',img]);
    apps.push(['Zip Code','InsertZipCodeHere',img]);
    //apps.push(['separator']);
    //apps.push(['','',img]);
    nItem=function(label,value,name,img){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      mItem.value = value;
      mItem.tooltipText = label;
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',img);
      mItem.setAttribute('name',name);
      return mItem;
    }
    mPop=document.createElement('menupopup');
    	for (var i=0;i<apps.length;i++){
    	 if (apps[i] =='separator'){
    		  mPop.appendChild(document.createElement('menuseparator'));
    	 }else{
    		  mPop.appendChild(nItem(apps[i] [0],apps[i] [1],'Permanent',apps[i] [2]));
    	 }
    	}
    this.siteGo=function(evt)
    {
    	var site=evt.target.value;
    	this.pasteItem(site);
    }
    this.pasteItem= function(value) {
    var theBox = document.commandDispatcher.focusedElement;
    var startPos = theBox.selectionStart;
    var endPos = theBox.selectionEnd;
    var oPosition = theBox.scrollTop;
    var oHeight = theBox.scrollHeight;
    var text=theBox.value.substring(0,startPos);
    var nHeight = theBox.scrollHeight - oHeight;
    var str = value;
    text +=str;
    text +=theBox.value.substring(endPos, theBox.value.length);
    theBox.value = text;
    theBox.selectionStart = startPos + str.length;
    theBox.selectionEnd = startPos + str.length;
    theBox.scrollTop = oPosition + nHeight;
    }
    this.appendChild(mPop);
    this.type = "menu";
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute("class", "menu-iconic");
    this.value=-1;
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080306.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clippings-menu.html');
    this.setAttribute("dependency",'FF 2.0,CB 2.0');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    

    Help Tab

    Add Clippings to be pasted anywhere by adding them to the array in this button.  Click on edit in the context menu
  95. Clock

    Code Tab

    this.startProcess('C:/WINDOWS/system32/control.exe','C:/WINDOWS/system32/timedate.cpl')

    Initialization Tab

    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\'));
     args=args.replace(/\//g,'\\');
    // file.launch();
     process.init(file);
     var arg=args.split(' ');
     process.run(false,arg,arg.length); 
    }
    this.hoursMode=12;
    //this.hoursMode=24; // uncomment if you prefer 24 hours mode
    this.xbmLib={
    	//добавляем нули
    	fixmod:function(s,n){
    	 while (s.length%n!=0) s='0'+s;
    	 return s;
    	},
    	//16-ый код в 2ый
    	h2b:function(s){
    	 var res='';
    	 for (var i=0;i<s.length;i++){
    	  res+=this.fixmod(parseInt(s.substring(i,i+1),16).toString(2),4);
    	 }
    	 return res;
    	},
    	//2-ый код в 16-ый
    	b2h:function(s){
    	 var res='';
    	 for (var i=0;i<s.length/4;i++){
    	  res+=parseInt(s.substring(i*4,i*4+4),2).toString(16);
    	 }
    	 return res;
    	},
    	//2ый код в матрицу по строкам
    	b2matrix:function(s,rows){
    	 var cols=s.length/rows;
    	 var ar=[];
    	 for (var i=0;i<rows;i++){
    	  ar[i]=s.substring(i*cols,(i+1)*cols);
    	 }
    	 return ar;
    	},
    	//2-ый код в xbm
    	b2xbm:function(s,rows){
    	 var cols=s.length/rows;
    	 var res='#define xbmtext_width '+cols+'\n';
    	 res+='#define xbmtext_height '+rows+'\n';
    	 res+='static unsigned char xbmtext_bits[] = {';
    	 var z=s.length/8;
    	 for (var i=0;i<z;i++){
    	  res+="0x";
    	  for (j=1;j>-1;j--)
    	   res+=this.b2h(s.substring(i*8+j*4,i*8+j*4+4).split('').reverse().join(''));
    	  if (i<z-1) res+=', ';
    	 }
    	 res+='}';
    	 return res;
    	},
    	//исх. строку в xbm
    	str2xbm:function(str,letters,rows){
    	 var m=[];
    	 for (var i=0;i<str.length;i++){
    	  var tm=this.b2matrix(this.h2b(letters[str.substring(i,i+1)]),rows);
    	  for (var j=0;j<tm.length;j++){
    	   if (i==0) m[j]='';
    	   m[j]+=tm[j];
    	  }
    	 }
    	 for (var i=0;i<m.length;i++)
    	  m[i]=this.fixmod(m[i],8);
    	 return this.b2xbm(m.join(''),rows);
    	}
    }
    this.letters={
     '[':'724924924923',
     '1':'fc000021820820821c00003f',
     '2':'fc000072208421083e00003f',
     '3':'fc000072208c08289c00003f',
     '4':'fc000010c524f8410400003f',
     '5':'fc0000fa083c08289c00003f',
     '6':'fc000031083c8a289c00003f',
     '7':'fc0000f8210420841000003f',
     '8':'fc000072289c8a289c00003f',
     '9':'fc00007228a278211800003f',
     '0':'fc00007228a28a289c00003f',
     ':':'f00000440044000f',
     ']':'95555556',
     ' ':'f00000000000000f'
    }
    this.setTime=function(){
     var time=new Date;
     var th=time.getHours()%this.hoursMode;
     var th=th%this.hoursMode;
     if ((th==0)&&this.hoursMode==12) th=12;
     var h=this.xbmLib.fixmod(th.toString(),2);
     var m=this.xbmLib.fixmod(time.getMinutes().toString(),2);
     var xbm=this.xbmLib.str2xbm('['+h+':'+m+']',this.letters,16);
     this.image='data:image/x-xbitmap,'+escape(xbm);
     var dd=(60-time.getSeconds())*1000;
     this.tooltipText=time.toLocaleDateString();
     setTimeout(this.setTime.bind(this),dd);
    }
     //this.disabled=true;
     this.setTime();
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/digital-clock-date-and-time-properties.html');

    Help Tab

  96. Clock24

    Code Tab

    // based on canvas tutorial example code
    // (http://developer.mozilla.org/en/docs/Canvas_tutorial:Basic_animations#An_animation_example_2)

    Initialization Tab

    if (!document. getElementById ("canvas-clock"))
    {
    	var canvas = document. createElementNS ("http://www.w3.org/1999/xhtml", "canvas");
    	canvas. setAttribute ("id", "canvas-clock");
    	canvas. setAttribute ("width", "24px;");
    	canvas. setAttribute ("height", "24px;");
    	canvas. setAttribute ("style", "min-width:24px;min-height:24px;height:24px;width:24px;max-width:24px;max-height:24px;");
    	var button = this;
    	setTimeout
    	(
    	    function ()
    	    {
    	        button. parentNode. insertBefore (canvas, button);
    		canvas. addEventListener
    		(
    			"click",
    			function (event)
    			{
    				button. hidden = !button. hidden;
    			},
    			false
    		);
    		button. hidden = true;
    	        var ctx = canvas. getContext("2d");
    	        ctx. scale (24 / 122, 24 / 122);
    	        var clock = function ()
    	        {
    			var now = new Date ();
    			var canvas = document. getElementById ("canvas-clock");
    			var ctx = canvas. getContext("2d");
    			ctx. save ();
    			ctx. clearRect (0, 0, 150, 150);
    			ctx. translate (61, 61);
    			ctx. scale (0.4, 0.4);
    			ctx. rotate (-Math. PI / 2);
    			ctx. strokeStyle = "black";
    			ctx. fillStyle = "white";
    			ctx. lineWidth = 12;
    			ctx. lineCap = "round";
    			ctx. save ();
    			ctx. beginPath ();
    			for (i = 0; i < 12; i++)
    			{
    			    ctx. rotate (Math. PI / 6);
    			    ctx. moveTo (100, 0);
    			    ctx. lineTo (120, 0);
    			}
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save ();
    			ctx. lineWidth = 5;
    			ctx. beginPath ();
    			for (i = 0; i < 60; i++)
    			{
    			    if (i % 5 != 0)
    			    {
    			        ctx. moveTo (117, 0);
    			        ctx. lineTo (120, 0);
    			    }
    			    ctx. rotate (Math. PI / 30);
    			}
    			ctx. stroke ();
    			ctx. restore ();
    			var sec = now. getSeconds ();
    			var min = now. getMinutes ();
    			var hr  = now. getHours ();
    			canvas. setAttribute ("title", [hr, min, sec]. join (" : "));
    			hr = hr >= 12? hr - 12: hr;
    			ctx. fillStyle = "black";
    			ctx. save ();
    			ctx. strokeStyle = "black";
    			ctx. rotate (hr * (Math. PI / 6) + (Math. PI / 360) * min + (Math. PI / 21600) * sec)
    			ctx. lineWidth = 14;
    			ctx. beginPath ();
    			ctx. moveTo (-20, 0);
    			ctx. lineTo (80, 0);
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save();
    			ctx. rotate ((Math. PI / 30) * min + (Math. PI / 1800) * sec)
    			ctx. lineWidth = 10;
    			ctx. beginPath ();
    			ctx. moveTo (-28, 0);
    			ctx. lineTo (112, 0);
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save();
    			ctx. rotate (sec * Math. PI / 30);
    			ctx. strokeStyle = "#D40000";
    			ctx. fillStyle = "#D40000";
    			ctx. lineWidth = 6;
    			ctx. beginPath ();
    			ctx. moveTo (-30, 0);
    			ctx. lineTo (93, 0);
    			ctx. stroke ();
    			ctx. fillStyle = "#555";
    			ctx. arc(0, 0, 3, 0, Math. PI * 2, true);
    			ctx. fill ();
    			ctx. restore ();
    			ctx. beginPath ();
    			ctx. lineWidth = 14;
    			ctx. strokeStyle = '#325FA2';
    			ctx. arc(0, 0, 142, 0, Math. PI * 2, true);
    			ctx. stroke ();
    			ctx. restore ();
    	        }
    	        clock ();
    	        setInterval
    	        (
    	            function ()
    	            {
    	                clock ();
    	            },
    	            1000
    	        );
    	    },
    	    2000
    	);
    }
    this.setAttribute('author','nicholas');
    this.setAttribute('version','S20080607.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clock-buttons-non-digital-really-neat.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  97. Clock36

    Code Tab

    // based on canvas tutorial example code
    // (http://developer.mozilla.org/en/docs/Canvas_tutorial:Basic_animations#An_animation_example_2)

    Initialization Tab

    if (!document. getElementById ("canvas-clock"))
    {
    	var canvas = document. createElementNS ("http://www.w3.org/1999/xhtml", "canvas");
    	canvas. setAttribute ("id", "canvas-clock");
    	canvas. setAttribute ("width", "36px;");
    	canvas. setAttribute ("height", "36px;");
    	canvas. setAttribute ("style", "min-width:36px;min-height:36px;height:36px;width:36px;max-width:36px;max-height:36px;");
    	var button = this;
    	setTimeout
    	(
    	    function ()
    	    {
    	        button. parentNode. insertBefore (canvas, button);
    		canvas. addEventListener
    		(
    			"click",
    			function (event)
    			{
    				button. hidden = !button. hidden;
    			},
    			false
    		);
    		button. hidden = true;
    	        var ctx = canvas. getContext("2d");
    	        ctx. scale (36 / 122, 36 / 122);
    	        var clock = function ()
    	        {
    			var now = new Date ();
    			var canvas = document. getElementById ("canvas-clock");
    			var ctx = canvas. getContext("2d");
    			ctx. save ();
    			ctx. clearRect (0, 0, 150, 150);
    			ctx. translate (61, 61);
    			ctx. scale (0.4, 0.4);
    			ctx. rotate (-Math. PI / 2);
    			ctx. strokeStyle = "black";
    			ctx. fillStyle = "white";
    			ctx. lineWidth = 12;
    			ctx. lineCap = "round";
    			ctx. save ();
    			ctx. beginPath ();
    			for (i = 0; i < 12; i++)
    			{
    			    ctx. rotate (Math. PI / 6);
    			    ctx. moveTo (100, 0);
    			    ctx. lineTo (120, 0);
    			}
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save ();
    			ctx. lineWidth = 5;
    			ctx. beginPath ();
    			for (i = 0; i < 60; i++)
    			{
    			    if (i % 5 != 0)
    			    {
    			        ctx. moveTo (117, 0);
    			        ctx. lineTo (120, 0);
    			    }
    			    ctx. rotate (Math. PI / 30);
    			}
    			ctx. stroke ();
    			ctx. restore ();
    			var sec = now. getSeconds ();
    			var min = now. getMinutes ();
    			var hr  = now. getHours ();
    			canvas. setAttribute ("title", [hr, min, sec]. join (" : "));
    			hr = hr >= 12? hr - 12: hr;
    			ctx. fillStyle = "black";
    			ctx. save ();
    			ctx. strokeStyle = "black";
    			ctx. rotate (hr * (Math. PI / 6) + (Math. PI / 360) * min + (Math. PI / 21600) * sec)
    			ctx. lineWidth = 14;
    			ctx. beginPath ();
    			ctx. moveTo (-20, 0);
    			ctx. lineTo (80, 0);
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save();
    			ctx. rotate ((Math. PI / 30) * min + (Math. PI / 1800) * sec)
    			ctx. lineWidth = 10;
    			ctx. beginPath ();
    			ctx. moveTo (-28, 0);
    			ctx. lineTo (112, 0);
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save();
    			ctx. rotate (sec * Math. PI / 30);
    			ctx. strokeStyle = "#D40000";
    			ctx. fillStyle = "#D40000";
    			ctx. lineWidth = 6;
    			ctx. beginPath ();
    			ctx. moveTo (-30, 0);
    			ctx. lineTo (93, 0);
    			ctx. stroke ();
    			ctx. fillStyle = "#555";
    			ctx. arc(0, 0, 3, 0, Math. PI * 2, true);
    			ctx. fill ();
    			ctx. restore ();
    			ctx. beginPath ();
    			ctx. lineWidth = 14;
    			ctx. strokeStyle = '#325FA2';
    			ctx. arc(0, 0, 142, 0, Math. PI * 2, true);
    			ctx. stroke ();
    			ctx. restore ();
    	        }
    	        clock ();
    	        setInterval
    	        (
    	            function ()
    	            {
    	                clock ();
    	            },
    	            1000
    	        );
    	    },
    	    2000
    	);
    }
    this.setAttribute('author','nicholas');
    this.setAttribute('version','M20080607.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clock-buttons-non-digital-really-neat.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  98. Clock48

    Code Tab

    // based on canvas tutorial example code
    // (http://developer.mozilla.org/en/docs/Canvas_tutorial:Basic_animations#An_animation_example_2)

    Initialization Tab

    if (!document. getElementById ("canvas-clock"))
    {
    	var canvas = document. createElementNS ("http://www.w3.org/1999/xhtml", "canvas");
    	canvas. setAttribute ("id", "canvas-clock");
    	canvas. setAttribute ("width", "24px;");
    	canvas. setAttribute ("height", "24px;");
    	canvas. setAttribute ("style", "min-width:24px;min-height:24px;height:24px;width:24px;max-width:24px;max-height:24px;");
    	var button = this;
    	setTimeout
    	(
    	    function ()
    	    {
    	        button. parentNode. insertBefore (canvas, button);
    		canvas. addEventListener
    		(
    			"click",
    			function (event)
    			{
    				button. hidden = !button. hidden;
    			},
    			false
    		);
    		button. hidden = true;
    	        var ctx = canvas. getContext("2d");
    	        ctx. scale (24 / 122, 24 / 122);
    	        var clock = function ()
    	        {
    			var now = new Date ();
    			var canvas = document. getElementById ("canvas-clock");
    			var ctx = canvas. getContext("2d");
    			ctx. save ();
    			ctx. clearRect (0, 0, 150, 150);
    			ctx. translate (61, 61);
    			ctx. scale (0.4, 0.4);
    			ctx. rotate (-Math. PI / 2);
    			ctx. strokeStyle = "black";
    			ctx. fillStyle = "white";
    			ctx. lineWidth = 12;
    			ctx. lineCap = "round";
    			ctx. save ();
    			ctx. beginPath ();
    			for (i = 0; i < 12; i++)
    			{
    			    ctx. rotate (Math. PI / 6);
    			    ctx. moveTo (100, 0);
    			    ctx. lineTo (120, 0);
    			}
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save ();
    			ctx. lineWidth = 5;
    			ctx. beginPath ();
    			for (i = 0; i < 60; i++)
    			{
    			    if (i % 5 != 0)
    			    {
    			        ctx. moveTo (117, 0);
    			        ctx. lineTo (120, 0);
    			    }
    			    ctx. rotate (Math. PI / 30);
    			}
    			ctx. stroke ();
    			ctx. restore ();
    			var sec = now. getSeconds ();
    			var min = now. getMinutes ();
    			var hr  = now. getHours ();
    			canvas. setAttribute ("title", [hr, min, sec]. join (" : "));
    			hr = hr >= 12? hr - 12: hr;
    			ctx. fillStyle = "black";
    			ctx. save ();
    			ctx. strokeStyle = "black";
    			ctx. rotate (hr * (Math. PI / 6) + (Math. PI / 360) * min + (Math. PI / 21600) * sec)
    			ctx. lineWidth = 14;
    			ctx. beginPath ();
    			ctx. moveTo (-20, 0);
    			ctx. lineTo (80, 0);
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save();
    			ctx. rotate ((Math. PI / 30) * min + (Math. PI / 1800) * sec)
    			ctx. lineWidth = 10;
    			ctx. beginPath ();
    			ctx. moveTo (-28, 0);
    			ctx. lineTo (112, 0);
    			ctx. stroke ();
    			ctx. restore ();
    			ctx. save();
    			ctx. rotate (sec * Math. PI / 30);
    			ctx. strokeStyle = "#D40000";
    			ctx. fillStyle = "#D40000";
    			ctx. lineWidth = 6;
    			ctx. beginPath ();
    			ctx. moveTo (-30, 0);
    			ctx. lineTo (93, 0);
    			ctx. stroke ();
    			ctx. fillStyle = "#555";
    			ctx. arc(0, 0, 3, 0, Math. PI * 2, true);
    			ctx. fill ();
    			ctx. restore ();
    			ctx. beginPath ();
    			ctx. lineWidth = 14;
    			ctx. strokeStyle = '#325FA2';
    			ctx. arc(0, 0, 142, 0, Math. PI * 2, true);
    			ctx. stroke ();
    			ctx. restore ();
    	        }
    	        clock ();
    	        setInterval
    	        (
    	            function ()
    	            {
    	                clock ();
    	            },
    	            1000
    	        );
    	    },
    	    2000
    	);
    }
    this.setAttribute('author','nicholas');
    this.setAttribute('version','S20080607.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/clock-buttons-non-digital-really-neat.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  99. Close + Set TMP on-tab-close focus behaviour (context menu)

    Code Tab

    /*
        This button requires Tab Mix Plus (TMP): https://addons.mozilla.org/en-US/firefox/addon/1122
        Left click the button to close the current tab.
        Right click the button to show the context menu for setting TMP's on-tab-close focus behaviour.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var imgCB = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnsK8UpK2sy6Cqqr6msLEaAAAAAAAAAAAAAAAAwbS3DtDGxs6jmZnajYeEvI+LhxcAAAAAAAAAAAAAAAAAAAAAqLGxBa+5ucymsbPwtsDCxcvQ1aDV1twUuauxFK+fpayklZn3jH+A/YuBf9OOh4QaAAAAAAAAAAAAAAAAAAAAAAAAAADX4OK7u8bI+rC5vPvJzdLx3NnesdbM0rO/r7XXlIGH/Yh3evuvo6Ljt6yqGAAAAAAAAAAAAAAAAAAAAAAAAAAA6/DysLTAxP+4wMX7y87T8e3r8Ozt5urt1MbM9rWhqPeeiI7p1MHDh9bGxwcAAAAAAAAAAAAAAAAAAAAAz9reBdvk6L2qtrz/tr3E/NHU2fno5+v37OXp99zO1Pi/q7L2pIuT6su2vGHIsLYCAAAAAAAAAAAAAAAAjJmfAaGvtCGptbuzmaWt+7S7w/vX2t/86Ofr++7o7Pzg0tj8vqiw+5B0ff6pj5Xamn+FKpBzegIAAAAAkpufAoqVmyWJlpyokp+m146aof+3vsX71Njd/eno7P3v5+z93s/W/begqP17XGb9clVd9H1iaL19ZmsyemhsApCZnSSIkpbHg4+VyYuXnumLmJ//qa63/tTX3f7z8vb+9O3x/eTV3P22nab9dlZg/l1BSPtgSE3ocl9ivoJwcyaWn6O9fIWKz4aRlqaTnqTEmaat/7K4wf/W2eD+8e/0/fDp7vrj09r4uqGr8oFkbfxpT1XmUTtAw2VSVsCSgYTDAAAAAAAAAAAAAAAAq7S6U7/IztG2vcT+2Nrg8+rn7fzp3+b43s3V6ragqdWxmKCqkXh/LQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NvigdHS2fDl3uf+3tDa/s+8xuzRu8RsAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjc4wvX193A5uLo/d/U2v7Wyc/Z1sbMEAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OPp2eDc4fLVy9H75dnfmwAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** VARS ***** //
    var button = this;
    var buttonID = this.getAttribute("id");
    var prefstring = "extensions.tabmix.focusTab";
    this.ss = [
    	{ label: "First tab", value: 0 },
    	{ label: "Left tab", value: 1 },
    	{ label: "Opener/Right tab", value: 2 },
    	{ label: "Last tab", value: 3 },
    	{ label: "Last selected tab", value: 4 },
    	{ label: "Right tab", value: 5 },
    	{ label: "Last opened tab", value: 6 },
    ]
    // ***** DETERMINES WHICH ITEM IS CHECKED IN THE CONTEXT MENU ***** //
    this.getIndex = function(aNode) {                    
    	try {
    	// Tries to pull out the preferences value
    		var pref = custombuttons.getPrefs(prefstring);
    	} 
    	catch(ex) {
    // If the above retrieval fails, the preference value is set to 2 as this is the default TMP setting                                         
    		custombuttons.setPrefs(prefstring,2);
    	}
    	var pref = custombuttons.getPrefs(prefstring);                
    // Uncheck all the menu items
    	for(var i = 0; i < aNode.childNodes.length; i++) {              
    		aNode.childNodes[i].removeAttribute("checked");         
    	}
    // Check the menu item where it's index value corresponds to the preference value
    	aNode.childNodes[pref].setAttribute("checked", true);
    }
    // ***** CHECKS AN ITEM IN THE CONTEXT MENU ***** //
    this.setIndex = function(aNode) {
        var pref = custombuttons.getPrefs(prefstring);
    // Sets the preference value to the index value of the aNode passed into this function.
    // In other words, when a particular option is clicked and passed into this function, set the preference value accordingly.
        var i = aNode.getAttribute("index");
        custombuttons.setPrefs(prefstring,parseInt(i));
    // Also check the menu item
        aNode.checked = true;
    }
    // ***** USED TO ADD THE ITEMS TO THE CONTEXT MENU ***** //
    function addMenuItem(aNode, aObject, aIndex, aLabel, aValue) {
    	var mi = aNode.appendChild(document.createElement("menuitem"));
    // Notice that the oncommand event (for the menu item created by this function) is set to call the setIndex function above.
    // The upshot of this is, when the menu item is clicked, the preference value is set to the menu item's index and the menu item becomes checked.
    	mi.setAttribute("oncommand", "document.popupNode.setIndex(this)");
    	mi.setAttribute("index", aIndex);
    	mi.setAttribute("label", aLabel);
    	mi.setAttribute("value", aValue);
    	mi.setAttribute("type", "checkbox");
    	mi.setAttribute("autoCheck", false);
    }
    // ***** MOVES THE CB² CONTEXT MENU INTO A SUBMENU BELOW A MENU SEPERATOR AT THE END OF THE EXISTING CONTEXT MENU ***** //
    function copyMenuItems(node, id, separate) {
    	var menupopup = document.getElementById(id).cloneNode(true);
    	var menuitems = menupopup.childNodes.length;
    	for(var i = 0; i < menuitems; i++)
    	node.appendChild(menupopup.firstChild);
    	if(separate)
    	node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
    	var m = aNode.appendChild(document.createElement("menu"));
    	m.setAttribute("label", "Custom Button");
            m.setAttribute("image", imgCB);
    	var mp = m.appendChild(document.createElement("menupopup"));
    	copyMenuItems(mp, "custombuttons-contextpopup");
    	aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    // ***** ADDS THE MENU ITEMS TO THE CONTEXT MENU ***** //
    const popupID = "cbContext-TMP-OnTabCloseFocusBehaviour-"+buttonID;
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.getIndex(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    // For the array of menu items, add each one to the context menu using our addMenuItem function from earlier
    for(var i = 0; i < this.ss.length; i++) {
    	addMenuItem(pop, this, i, this.ss[i].label, this.ss[i].value);
    }
    // ***** SHOW POPUP FUNCTION ***** // 
    this.showPopup = function(node) {
      var popup = document.getElementById(popupID);
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height + 24;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
            gBrowser.removeCurrentTab();
    };
    this.rightclick = function(evt) 
    {
    	this.showPopup(this);
    };
    // ***** INITIALISATION ***** //
    // Move the CB² context menu into the submenu and set our menu as the context menu
    cloneCBContext(pop);
    this.setAttribute("context", popupID);
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.tooltipText = "L: Close current tab"+"\n"+"R: Show focus behaviour context menu";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/close-andor-set-tmp-tab-close-focus-behaviour-buttons.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to close the current tab.
    Right click the button to show the context menu.
    Read the menu as: "When closing current tab, focus:" menu item, e.g. "left tab".
  100. Close + Set TMP on-tab-close focus behaviour (drop-marker menu button)

    Code Tab

    /*
        This button requires Tab Mix Plus: https://addons.mozilla.org/en-US/firefox/addon/1122
        Left click the main button to close the current tab.
        Left click the drop-marker to show the menu for setting TMP's on-tab-close focus behaviour.
        Rawny ^^
    */
    gBrowser.removeCurrentTab();

    Initialization Tab

    // ***** VARS ***** //
    var button = this;
    var buttonID = this.getAttribute("id");
    var prefstring = "extensions.tabmix.focusTab";
    this.ss = [
    	{ label: "First tab", value: 0 },
    	{ label: "Left tab", value: 1 },
    	{ label: "Opener/Right tab", value: 2 },
    	{ label: "Last tab", value: 3 },
    	{ label: "Last selected tab", value: 4 },
    	{ label: "Right tab", value: 5 },
    	{ label: "Last opened tab", value: 6 },
    ]
    // ***** DETERMINES WHICH ITEM IS CHECKED IN THE CONTEXT MENU ***** //
    this.getIndex = function(aNode) {                    
    	try {
    	// Tries to pull out the preferences value
    		var pref = custombuttons.getPrefs(prefstring);
    	} 
    	catch(ex) {
    // If the above retrieval fails, the preference value is set to 2 as this is the default TMP setting                                         
    		custombuttons.setPrefs(prefstring,2);
    	}
    	var pref = custombuttons.getPrefs(prefstring);                
    // Uncheck all the menu items
    	for(var i = 0; i < aNode.childNodes.length; i++) {              
    		aNode.childNodes[i].removeAttribute("checked");         
    	}
    // Check the menu item where it's index value corresponds to the preference value
    	aNode.childNodes[pref].setAttribute("checked", true);
    }
    // ***** CHECKS AN ITEM IN THE CONTEXT MENU ***** //
    this.setIndex = function(aNode) {
        var pref = custombuttons.getPrefs(prefstring);
    // Sets the preference value to the index value of the aNode passed into this function.
    // In other words, when a particular option is clicked and passed into this function, set the preference value accordingly.
        var i = aNode.getAttribute("index");
        custombuttons.setPrefs(prefstring,parseInt(i));
    // Also check the menu item
        aNode.checked = true;
    }
    // ***** SHOW POPUP FUNCTION ***** // 
    this.popupShowing = function(aNode) {
         	while (aNode.hasChildNodes())
    		aNode.removeChild(aNode.firstChild);
    	var l = button.ss.length;
    	for(var i = 0; i < l; i++) {
    		var mi = document.createElement("menuitem");
                    var commandstring = "document.popupNode.setIndex(this);";
                    mi.setAttribute("oncommand", commandstring);
    	        mi.setAttribute("index", i);
                    mi.setAttribute("label", this.ss[i].label);
    	        mi.setAttribute("value", this.ss[i].value);
    	        mi.setAttribute("type", "checkbox");
    	        mi.setAttribute("autoCheck", false);
                    mi.tooltipText = this.ss[i].label;
                    mPopup.appendChild(mi);
    	}
            button.getIndex(aNode);
    }
    // ***** INITIALISATION ***** //
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.tooltipText = "Button: Close current tab"+"\n"+"Drop-marker: Show focus behaviour menu";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/close-andor-set-tmp-tab-close-focus-behaviour-buttons.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the main button to close the current tab.
    Left click the drop-marker to see the menu.
    Read the menu as: "When closing current tab, focus:" menu item, e.g. "left tab".
  101. Close Blank Tabs, Duplicate Tabs & Tabs From This Host All in One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    document.getElementById('closy-blank').click();
    }
    this.rightclick = function(e) {
    document.getElementById('closy-dupe').click();
    }
    this.midclick = function(e) {
    document.getElementById('closy-host').click();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Close blank tabs|M: Close this host|R: Close Duplicate tabs";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/close-blank-tabs-duplicate-tabs-tabs-host-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  102. Close current tab (no menu)

    Code Tab

    gBrowser.removeCurrentTab();
    

    Initialization Tab

    this.tooltipText = "Close tab";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/close-andor-set-tmp-tab-close-focus-behaviour-buttons.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left clicking the button closes the current tab.
  103. Close Tab

    Code Tab

    /* -------------------------------------------------------------
         Close Tab Button
         by LouCypher (aka Zoolcar9)
         Left click: close current tab
         Middle click: close all tabs
         Right click: close other tab(s)
         Shift+click: show context menu
       ------------------------------------------------------------- */
    

    Initialization Tab

    this.closeAllTabs = function() { //ripped from TMP
      if(gBrowser.warnAboutClosingTabs("All")) {
        var childNodes = gBrowser.mTabContainer.childNodes;
        for (var i = childNodes.length - 1; i >= 0; i--)
          if (childNodes[i] != gBrowser.mCurrentTab)
            gBrowser.removeTab(childNodes[i]);
        gBrowser.removeTab(gBrowser.mCurrentTab);
      }
    }
    this.closeTab = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
      switch(evt.button) {
        case 0:
          //close current tab
          gBrowser.removeCurrentTab();
          break;
        case 1:
          //close all tabs
          this.closeAllTabs();
          break;
        case 2:
          //close other tabs
          gBrowser.removeAllTabsBut(gBrowser.mCurrentTab);
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.tooltipText = "Left click - close current tab, middle click - close all tabs, right click - close other tabs";
    this.setAttribute("onclick", "this.closeTab(event);");
    this.setAttribute("context", "");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/close-tab.html');

    Help Tab

  104. Close this toolbar

    Code Tab

    /*Code*/
    // If you would like your browser to always start with
    // this toolbar collapsed:-
    // un comment the code in the initialisation tab
    //
    // Thanks to ithinc for the "persist" line.
    const toolbar = document.getElementById(this.parentNode.id);
    toolbar.collapsed = true;
    toolbar.setAttribute("persist", "collapsed");
    

    Initialization Tab

    /*Initialization code*/
    /*
    const toolbar = document.getElementById(this.parentNode.id);
    toolbar.collapsed = true;
    toolbar.setAttribute("persist", "collapsed");
    */
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important;");
    this.thisbar = document.getElementById(this.parentNode.id);
    var checkcb = this.thisbar.id
     // alert("thisbar = " + this.thisbar.id);
     var rExp = /__customToolbar_/;
      if(rExp.test(checkcb))
      {
        checkcb = checkcb.substring(16, checkcb.length);
      }
    this.tooltipText = "Close " + checkcb + " toolbar";
    /*---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky");
    this.setAttribute("version","20080308.1.2");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/close-exit-toggle-toolbar.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/close-exit-toggle-toolbar.html');

    Help Tab

    /* +++----------------------- help information for this button -----------------------+++ */
    No help developed for 
    <label> button
    custombuttons-button<id>.
    
  105. Code

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    var End = Cb.isPref("extensions.custombuttons.tagIt.index",0);
    this.info = '\n\nBBCode: [co'
    this.info += 'de]Clipboard[/co'
    this.info += 'de]\n\nHTML: <co'
    this.info += 'de>Clipboard</co'
    this.info += 'de>';
    this.ss = [
      { label: 'BBCode', open: '[co'+'de]', open1: '[co'+'de]%h', close: '[/co'+'de]', sItemId: '' },
      { label: 'HTML'  , open: '<co'+'de>', open1: '<co'+'de>%h', close: '</co'+'de>', sItemId: '' },
      { label: 'WIKI'  , open: '\t\t'     , open1: '\t\t%h'     , close: ''          , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc     : '',
      theBox    : {},
      startPos  : 0,
      endPos    : 0,
      oPosition : 0,
      oHeight   : 0,
      text      : '',
      nHeight   : 0,
      Highlight : '',
      eBlock    : '',
      cBoard    : '',
      n         : '',
      initMeth  : function( oBtn ){
            this.index  = Number(Cb.getPrefs("extensions.custombuttons.tagIt.index"));
            this.listo  = oBtn.ss[this.index].open;
            this.liste  = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos     = this.theBox.selectionEnd;
              this.oPosition  = this.theBox.scrollTop;
              this.oHeight    = this.theBox.scrollHeight;
              this.text       = this.theBox.value.substring(0,this.startPos);
              this.nHeight    = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock     = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard     = gClipboard.read();
              this.n          = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          x.text += x.listo;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
                            if (x.listc){
            this.pref=1;
            this.checked=true;
                            }
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if ( e.ctrlKey && x.index === 2 ) {
        this.processLines( e, x )
      } else {
        if (!x.cBoard) {
          alert('Middle-click expects the Clipboard to contain text to place between Code tags.\n\n'+this.info );
          return;
        }
        x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n;
        x.theBox.value = x.text + x.eBlock;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      } // End if ( e.ctrlKey )
    }; // End this.doMid
    this.processLines = function( e, x )
    {
      x.arr = (e.ctrlKey)? x.cBoard.split('\n') : [x.cBoard];
      x.n = ( x.index === 2 )? "" : x.listo;
      for (var i in x.arr) {
        if ( x.arr[i].length > 0 ) {
          x.n += x.liste.replace(/%h/,x.arr[i]);
          x.n += (i < x.arr.length-1 ) ? '\n' : "";
        } else {
          x.n += '\n';
        } // End if ( x.arr.length > 2 )
      } // End for
      x.n += ( x.cBoard.length > 0 ) ? x.listc : '';
      x.text += x.n;
      var nLen = x.text.length
      x.text += x.eBlock;
      x.theBox.value = x.text;
      x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
      x.arr =[];
    }; // End function this.processLines( e, x, sText )
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      var prefstring = "extensions.custombuttons.tagIt.index";
      try {
        var ssIdx = Cb.getPrefs(prefstring);
      } catch(ex) {
        var ssIdx = 0;
        Cb.setPrefs(prefstring, ssIdx);
      }
      var aNodes = this.mObj.getItemsById('Note');
      for(var i = 0; i < aNodes.length; i++) {
        aNodes[i].setAttribute("checked",false);
      }
      aNodes[ssIdx].setAttribute("checked", true);
    }; // End this.getIndex(aNode)
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      var prefstring = "extensions.custombuttons.tagIt.index";
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      if (  !Cb.isPref("extensions.custombuttons.tagIt.index") ) {
        Cb.setPrefs("extensions.custombuttons.tagIt.index",0);
      } // End if ( !Cb.isPref("extensions.custombuttons.tagIt.index") )
      var index = Cb.getPrefs("extensions.custombuttons.tagIt.index");
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("extensions.custombuttons.tagIt.index"); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    **************************************************************
     L = IF text is highlighted:
       BBCode: [code]Highlighted[/code]
       HTML: <code>Highlighted</code>
       WIKI: \t\tHighlighted
       OR nothing highlighted
         First click = [code], <code>, or \t\t
         Second click = [/code], </code>, or \t\t
     M =
       BBCode: [code]Clipboard[/code]
       HTML: <code>Clipboard</code>
       WIKI: \t\tClipboard
     M+Ctrl in WIKI mode =
       \t\tClipboard
       \t\tcontents
     R = Context Menu with tag options and submenu for CB Context
  106. Color Chooser

    Code Tab

    /*Code*/
    bbcode.bbcode('color','bbcode');
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*---------------------- Show Focus Block Start ------------------------*/
    /* ---- un-comment if desired ----
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20070910.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/color-chooser-bbcode-ext.html');
    this.setAttribute('dependency','bbcode ext');
    this.setAttribute('status','complete');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/
         When the cursor is in a text-area a
         left-click on the button will open 
         the bbcode color chooser.
         The bbcode extension is required for this button.
         https://addons.mozilla.org/firefox/128/
    
  107. Color Wizard

    Code Tab

    /*Code*/
    window.open("http://www.colorsontheweb.com/thecolorwizard.asp","cw","menubar=1,resizable=1,width=710,height=568");
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','adrienne');
    this.setAttribute('version','20030830.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/color-wizard.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

  108. Color Wizard

    Code Tab

    /*Code*/
    window.open("http://www.colorsontheweb.com/thecolorwizard.asp#midflash","cw","menubar=1,resizable=1,width=710,height=568");
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','adrienne');
    this.setAttribute('version','20030830.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/color-wizard.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

  109. Compact Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var brand = document.getElementById("bundle_brand"),appName = brand.getString("brandShortName");
    var bar = (appName == "Thunderbird") ? document.getElementById('mail-menubar') : document.getElementById('main-menubar');
    var ff = "data:image/x-ico;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAABkAAAA6AAAATAAAAEkAAAA1AAAAFwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGwAAHX8BBmDSBhCV8AcXqvgHJKn2BjSV6wYyZ8oCCxZ5AAAAHgAAAAEAAAAAAAAAAAAAAAAAAAAAAAADKgAFXMYAAqr/BhC4/wkTuf8OJ7//CzjE/wVRy/8CeNb/BJLb/AU8ZMAAAAAxAAAAAAAAAAAAAAAAAAABFwANbcwFHr3/HEPL/w1Cy/8XZdj/Fmna/x123/8deN//DHfe/wCr6f8C2PX/AVh5wwAAAB0AAAAAAAAAAgACPY4IOcf/IHfe/w5v3P8Pc97/EXXe/yN40/82Yqn/LGi7/x584f8LcuD/Hcfy/xrh9/8AKzmDAAAAAwAACh8ILqryEXPd/xR13v8Ocd7/Fnbf/yROi/84FhX/UxcR/zMEAf8rKUn/F3jT/wKz8P9N6Pv/Iqe44QAAABoAAzxwDGHU/xx74f8Rat3/Aljg/wxc0P8NT8H/EFXC/xgxZf8nEhf/MAMA/0UzQP8lvNX/HrX4/2Pm+v8DERpQBx54tx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sGv/sq2o/7Ouqv+dmpf/IB8fHtHR0TXGxMP/yMXC/8rHxP/Qzsv/4N7c/+Pi4P/m5eT/6M65/+6wb//qtXf/zbad/7+8uP+9urb/pqOg/zU0NB3w8PAdxcPC+c/Myv/Ny8j/1tTS/97c2v/n5eT/7+7t/+7t7f/bysH/xIhb/7qObv/Sz83/0s/N/6Khn/Rvb28D+vr6B9DQz8zf3dv/29nX/97c2v/p6Of/8O/u//X09P/29fX/7ZhR//WcOP/3mzb/3sGo/9bU0v+XlpWvAAAAAAAAAADj4+No1tXT/sG1r//V0c//7+7t//Hx8P/29vX/6eDb//KZPf/5r1D/+L1p/+jZyf/HxcT+fHt7OQAAAAAAAAAA/f39DN2Sa87obiX/3HEr/+G5oP/ixrP/14A8/+eILf/1unT/1aFs/9SVWf/Xyb//k5OShwAAAAAAAAAAAAAAAAAAAADYbB9A53wr4fKgS//wtXr/8sek//WVNf/5umT/893E//aUKv/8pTj/zpNKnGdmZgEAAAAAAAAAAAAAAAAAAAAAAAAAALpgAAJyWUI9oqGfrsPDw/TXyr3/2Mu+/8bGxvSvl3ut15VBULxjAgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaGhoERUVFHENDQxwlJSUEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8A+sQeAHrEHAA6xBgAGsQYABrEEAAKxBAACsQQAArEEAAKxBAACsQQABrEGAAaxBgAOsQcADrEHgB6xB/D+sQQ==";
    this.image = (appName == "Thunderbird") ? tb : (appName == "Flock") ? fl : ff;
    var mPopid = this.id+'cb2CompactMenu',mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute('id',mPopid);
    bar.setAttribute("collapsed", "true");
    this.initBtn = function() {
      var mBarItems = bar.childNodes;
      bar.setAttribute('collapsed','true');
      for(i=0;i<mBarItems.length;i++) {
        if(mBarItems[i].nodeName == 'menu') {
          var mBarClone = mBarItems[i].cloneNode(true);
          document.getElementById(mPopid).appendChild(mBarClone);
        }
      }
    }
    setTimeout(this.initBtn, 5000);
    var that = this;
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 10);
      }
    }
    this.hideDropMarker();
    this.type="menu";
    // BUTTON ATTRIBUTES
    this.setAttribute("onmouseover", "this.hideDropMarker();");
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("author",'LouCypher,nicholas');
    this.setAttribute("version",'20081201.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/compact-menu-button.html');
    this.setAttribute("dependency",'FF 2.0.*, TB2.0*, CB 2.0.*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/compact-menu-button.html');

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  110. Compact Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var brand = document.getElementById("bundle_brand"),appName = brand.getString("brandShortName");
    var bar = (appName == "Thunderbird") ? document.getElementById('mail-menubar') : document.getElementById('main-menubar');
    var mPopid = this.id+'cb2CompactMenu',mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute('id',mPopid);
    bar.setAttribute("collapsed", "true");
    this.initBtn = function() {
      var mBarItems = bar.childNodes;
      bar.setAttribute('collapsed','true');
      for(i=0;i<mBarItems.length;i++) {
        if(mBarItems[i].nodeName == 'menu') {
          var mBarClone = mBarItems[i].cloneNode(true);
          document.getElementById(mPopid).appendChild(mBarClone);
        }
      }
    }
    setTimeout(this.initBtn, 5000);
    // Our two images, labeled correspondingly
    var imgOpen = 'data:image/x-ico;base64,AAABAAEAGxAAAAEAIAAoBwAAFgAAACgAAAAbAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMAAAAVAAAAFQAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAFQAAAD/AAAAVAAAAFQAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////g////4P///+D////g////4P///+D////gAAf/4H/3/+Bgt//gf/f/4GC3/+AAB//gAAf/4H/3/+AAB//g';
    // toggles the image to Open State
    this.toggleImgOpen = function() {
        this.setAttribute("image",imgOpen);
    }
    // latter
    this.toggleImgClosed = function() {
      this.setAttribute("image",imgClosed);
    }
    var that = this;
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 10);
      }
    }
    this.hideDropMarker();
    this.type="menu";
    this.image = imgClosed; // make sure it initializes with the correct image
    // BUTTON ATTRIBUTES
    this.setAttribute("onmouseover", "this.hideDropMarker(); this.toggleImgOpen();");
    this.setAttribute("onmouseout", "this.toggleImgClosed();" );
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("author",'LouCypher,nicholas');
    this.setAttribute("version",'20081201.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/compact-menu-button.html');
    this.setAttribute("dependency",'FF 2.0.*, TB2.0*, CB 2.0.*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  111. Compact Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var brand = document.getElementById("bundle_brand"),appName = brand.getString("brandShortName");
    var bar = (appName == "Thunderbird") ? document.getElementById('mail-menubar') : document.getElementById('main-menubar');
    var mPopid = this.id+'cb2CompactMenu',mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute('id',mPopid);
    bar.setAttribute("collapsed", "true");
    this.initBtn = function() {
      var mBarItems = bar.childNodes;
      bar.setAttribute('collapsed','true');
      for(i=0;i<mBarItems.length;i++) {
        if(mBarItems[i].nodeName == 'menu') {
          var mBarClone = mBarItems[i].cloneNode(true);
          document.getElementById(mPopid).appendChild(mBarClone);
        }
      }
    }
    setTimeout(this.initBtn, 5000);
    // Our two images, labeled correspondingly
    var imgOpen = 'data:image/x-ico;base64,AAABAAEAGxAAAAEAIAAoBwAAFgAAACgAAAAbAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAjAAAAIwAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////g////4P///+D////g////4P///+D////gAAf/4H/3/+Bgt//gf/f/4GC3/+AAB//gAAf/4H/3/+AAB//g';
    // toggles the image to Open State
    this.toggleImgOpen = function() {
        this.setAttribute("image",imgOpen);
    }
    // latter
    this.toggleImgClosed = function() {
      this.setAttribute("image",imgClosed);
    }
    var that = this;
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 10);
      }
    }
    this.hideDropMarker();
    this.type="menu";
    this.image = imgClosed; // make sure it initializes with the correct image
    // BUTTON ATTRIBUTES
    this.setAttribute("onmouseover", "this.hideDropMarker(); this.toggleImgOpen();");
    this.setAttribute("onmouseout", "this.toggleImgClosed();" );
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("author",'LouCypher,nicholas');
    this.setAttribute("version",'20081201.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/compact-menu-button.html');
    this.setAttribute("dependency",'FF 2.0.*, TB2.0*, CB 2.0.*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  112. Compile/DeCompile Button

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( this.CbStr.sButtonCompatabilityAlert );
      this.disable(true);
    }
    /*----  To make compile the default state, modify this variable to false -----*/
    this.bState = false;
    /*----------------------------------- End ------------------------------------*/
    this.Cb = custombuttons;
    this.properties = {
      en_US:{
        zLast:'Last no Comma'
      }
    };
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('...')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.leftclick  = function( evt ){
      this.execute( gClipboard.read() );
    };
    this.midclick = function(evt){
      var bnum = prompt('Enter Button #');
      var bid = 'custombuttons-button' + String(bnum);
      this.oBtn = document.getElementById(bid);
      if ( this.oBtn ) {
        this.execute(this.Cb.createLinks(0, this.oBtn));
      }
    };
    this.rightclick  = function(evt){
      let oResult = {};
      if ( this.bState ) {
        oResult = this.barSelect(this.aItems);
        if ( oResult.lresult ) {
          this.bState = !this.bState;
          this.linkType = oResult.nselected.value;
        } // End if ( oResult.lresult )
      } // End if ( !this.bState )
      else {
        this.bState = !this.bState;
      }
      this.image = ( this.bState )? this.img[0] : this.img[1];
      this.setToolTip( this );
    };
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    this.img = new Array();
    this.img.push( this.image );
    this.img.push( 'data:image/gif;base64,R0lGODlhEAAQAKIAAJ+hoUNISfDv79TU1Li2sHl9f/z8/P///yH5BAAAAAAALAAAAAAQABAAAANeeLoqVcAYIhgbIdcyLDNAMIyCUWSERQRnsLphuqyjmz1sUR1rWayPoEggCA0cLwKglWk6cTkWYEolUIhEzMCgkHi5koNWvPM0nubLA1Aym2SKqfs2PRW45kEQQFokAAA7' );
    this.aItems = new Array();
    this.aItems.push( 'Copy to Clipboard' );
    this.aItems.push( 'Copy as BBCodeLink' );
    this.aItems.push( 'Copy as HyperLink' );
    this.linkType = 0;
    this.image = ( this.bState )? this.img[0] : this.img[1];
    /**  setToolTip( btn )
     Author:  George Dunham aka: SCClockDr
     Scope:  private
     Args:  btn -
     *
     Returns:  Nothing
     Called by:  1.
     Purpose:   1. Set the tooltip to reflect the correct state
     TODO:  1.
     */
    this.setToolTip = function( btn ) //{{{
    {
      let cLinkType = btn.aItems[btn.linkType].replace( 'Copy', '' );
      let tmp = ( btn.bState )? "DeCompile to Clipboard as text" : "Compile" + cLinkType;
      let x = btn.tooltipText;
      let nIndex = (/De/.test(x))? x.indexOf('De') : x.indexOf('Compile');
      btn.tooltipText = btn.tooltipText.substring( 0, nIndex ) + tmp;
    }; //}}} End Method setToolTip( btn )
    this.execute=function(uri)
    {
      let aCode = [];
      if ( this.bState ) {
        var oRet = this.Cb.oSplitButtonURI(uri);
        if (typeof oRet == CB2const.OBJECT){
          var x = '// ' + oRet.name+'\n';
          x += '// ' + CB2const.bFieldSepNew + oRet.image+'\n';
          x += '// ' + CB2const.bFieldSepNew;
          x += ( oRet.code.toLowerCase().indexOf('/*code*/') > -1 )? '' : '/*Code*/\n';
          x += oRet.code;
          x += ( oRet.code.indexOf('========') > -1 )? '' : '\n// =============================================================================\n';
          x += '// ' + CB2const.bFieldSepNew;
          x += ( oRet.initCode.toLowerCase().indexOf('/*initialization code*/') > -1 )? '' : '/*Initialization code*/\n';
          x += oRet.initCode.replace(/\/\/\.\.\./g,'');
          x += '\n// ' + CB2const.bFieldSepNew + "/* Help */\n";
          x += oRet.Help;
          gClipboard.write(unescape(x));
        } // End if (typeof oRet == CB2const.OBJECT)
      } // End if ( bState )
      else {
        let sSplit = '// ' + CB2const.bFieldSepNew;
        aCode = uri.split( sSplit );
        var oValues = {
          name:     aCode[0].replace('// ','').replace('\n','') || '',
          image:    aCode[1] || '',
          code:     aCode[2] || '',
          initCode: aCode[3] || '',
          Help:     aCode[4].replace(/\/\* Help \*\/\n/,"") || ''
        };
        let sLinkChunk = custombuttons.buildLinkChunk( oValues );
        switch ( this.linkType )
        {
        case 1:
          uri = "[cb=custombutton://";
          uri += sLinkChunk + ',';
          uri += unescape(oValues.image) + "]" + unescape(oValues.name) + "[/cb]";
          break;
        case 2:
          uri =  '<a href="custombutton://' + sLinkChunk + '" title="';
          uri += unescape(oValues.name) + '"><img alt="' + unescape(oValues.name);
          uri += '" src="' + unescape(oValues.image) + '" border="0" ';
          uri += 'style="margin: 0 6px;" />' + unescape(oValues.name) + '</a>';
          break;
        default :
          uri='custombutton://' + sLinkChunk;
          break;
        } // End switch ( this.linkType )
        gClipboard.write( uri );
      } // End else ( bState )
    }; // End function this.execute(uri)
    this.getSupportedFlavours = function () {
      var flavours = new FlavourSet();
      flavours.appendFlavour("text/unicode");
      return flavours;
    }; // End function this.getSupportedFlavours()
    this.onDragOver = function(e,f,s){}
    this.onDrop = function(event,dDat,session){
      this.execute(dDat.data.split('\n')[0]);
    }; // End function this.onDrop(event,dDat,session)
    this.barSelect = function(items){
      var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                              .getService(Components.interfaces.nsIPromptService);
      var selected = {};
      var result = prompts.select(null, "Link Type Select"
                                  , "Select the Link type you wish to produce."
                                  , items.length, items, selected);
      return {lresult : result, nselected : selected};
    }; // End function this.barSelect(items)
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author", "deepakjoshi04, SCClockDr" );
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.setAttribute("dependency","FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0.6*");
    this.setAttribute("version","8.20090213.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/button-decompile-compile-group.html');
    this.setToolTip( this );
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    **************************************************
     To use:
     Right Click Toggles between DeCompile & Compile
    Decompile:
      1. Copy link to clipboard.
      2. Left Click on this Button.
         OR
      3. Drag the link & drop it on this button
         a. For button code (Clipboard type link)
      4. Block copy the code.
      5. Drag & drop or Left Click this button.
      6. Paste the contents of the clipboard into your
         favorite editor.
    Compile:
      1. Copy the entire buffer to the clopboard
      2. Right Click this button
      3. Select the appropriate link type
      4. Click OK
      5. Now Left Click the button.
           The clipboard now contains the link
             Paste it where you wish
    
  113. Confirm Box Demo

    Code Tab

    var cbTitle = "My Title"; // Title of the confirmation box
    var cbDesc = "My Description/Instructions"; // Instructions/Info just before the buttons
    var cbBtn1 = "Yes";
    var cbBtn2 = "No";
    var cbPrompt = custombuttons.confirmBox(cbTitle, cbDesc, cbBtn1, cbBtn2);
    if (cbPrompt == false) alert('No Button was clicked'); // "No" button was clicked
    if (cbPrompt == true) alert('Yes Button was clicked'); // "Yes" button was clicked

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081210.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  114. Confirm Box Demo (3 buttons)

    Code Tab

    var cbTitle = "My Title"; // Title of the confirmation box
    var cbDesc = "My Description/Instructions"; // Instructions/Info just before the buttons
    var cbBtn1 = "Yes";
    var cbBtn2 = "No";
    var cbBtn3 = "Maybe";
    var cbPrompt = custombuttons.confirmBox3(cbTitle, cbDesc, cbBtn1, cbBtn2, cbBtn3);
    if (cbPrompt == 0) alert('Yes was clicked'); // "Yes" button was clicked
    else if (cbPrompt == 1) alert('No was clicked'); // "No" button was clicked
    else if (cbPrompt == 2) alert('Maybe was clicked'); // "Maybe" button was clicked

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081210.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  115. ConQuery

    Code Tab

    /*Code*/
    /* -------------------------------------------------------------------
         ConQuery Toolbarbutton Menu
         by LouCypher (aka Zoolcar9)
         Toolbarbutton menu for ConQuery
         Requires ConQuery extension (http://conquery.mozdev.org)
         Changelog:
         2005-12-14: initial release (for Customizable Toolbar Buttons)
         2006-06-16: for Custom Buttons
         2006-07-05: can use searchbar as search query
         2006-07-13: fixed for Firefox 2.0b1
       ------------------------------------------------------------------- */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if(typeof conQueryInit != "function") {
      var ext = "ConQuery";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.getSearchBox = function() {
      var searchbar, searchbox, sEngine, sInput;
      searchbar = document.getElementById("flock_searchbar") ||
                  document.getElementById("searchbar");
      searchbox = searchbar.mTextbox || searchbar._textbox;
      sEngine = searchbar._ss
                ? searchbar._ss.currentEngine.name
                : searchbar.tooltipText.replace(/^Search\s/, "");
      sInput = searchbox.value.replace(/\sSearch$/, "") || searchbox.value;
      if(sEngine == sInput || searchbox.firstChild.src == "")
        cqrPageSelection = "";
      else
        cqrPageSelection = searchbox.value;
    }
    this.conQuery = function() {
      FillMenu("","");
      var cqppm = document.getElementById("cq-ppm");
      var mPopup = cqppm.cloneNode(true);
      mPopup.removeAttribute("id");
      //mPopup.popupShowing = this.getSearchBox.bind(this);
      mPopup.setAttribute("onpopupshowing", "this.parentNode.getSearchBox()");
      this.appendChild(mPopup);
    }
    this.onClick = function(aEvent) {
      if(aEvent.button == 1) {
        this.removeChild(this.getElementsByTagName("menupopup")[0]);
        this.conQuery();
      }
    }
    this.dblClick = function(aEvent) {
      OpenCfgDialog();
      this.removeChild(this.getElementsByTagName("menupopup")[0]);
      this.conQuery();
    }
    this.conQuery();
    this.type = "menu";
    this.setAttribute("onclick", "this.onClick(event)");
    this.setAttribute("ondblclick", "this.dblClick(event)");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','20060823.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/conquery-buttton-menu.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

  116. context menu demo button

    Code Tab

    /* 
      Vaguely based on code from nicholas' Gmail Compose button:
      http://custombuttons2.com/forum/buttons-database/gmail-compose-t1005.html
      Thanks to nicholas for pointing me at this and his further assistance.
      Also thanks to makondo and jw25 for their encouragement!
      Rawny ^^
    */

    Initialization Tab

    // ***** DEFINE MENU ITEM ARRAY ***** //
    /*  
        Each menu item here is defined with a label that is shown in the menu and a value (called "myvalue") that can be accessed later.
        Because this is an array all these menu items have an index value too. 
        For example, "Option A" will have the index value of 0, "Option B" will have the index value of 1, and so on
    */
    this.ss = [
    	{ label: "Option A", myvalue: "A" },
    	{ label: "Option B", myvalue: "B" },
    	{ label: "Option C", myvalue: "C" }
    ]
    // ***** DETERMINES WHICH ITEM IS CHECKED IN THE CONTEXT MENU ***** //
    this.getIndex = function(aNode) {
    // Sets prefstring to the location of this buttons preferences
    	var prefstring = "custombuttons.menutest.index";                
    	try {
    // Tries to pull out the preference value from that location
    		var ssIdx = gPrefService.getIntPref(prefstring);        
    	} 
    	catch(ex) {
    // If the above retrieval fails, the preference value is set to "0"
    		var ssIdx = 0;                                          
    		gPrefService.setIntPref(prefstring, ssIdx);             
    	}
    // Uncheck all the menu items
    	for(var i = 0; i < aNode.childNodes.length; i++) {              
    		aNode.childNodes[i].removeAttribute("checked");         
    	}
    // Check the menu item where it's index value corresponds to the preference value
    	aNode.childNodes[ssIdx].setAttribute("checked", true);
    }
    // ***** CHECKS AN ITEM IN THE CONTEXT MENU ***** //
    this.setIndex = function(aNode) {
    	var prefstring = "custombuttons.menutest.index"; 
    // Sets the preference value to the index value of the aNode passed into this function.
    // In other words, when a particular option is clicked and passed into this function, set the preference value accordingly.
    	gPrefService.setIntPref(prefstring, aNode.getAttribute("index"));
    // Also check the menu item
    	aNode.checked = true;
    }
    // ***** USED TO ADD THE ITEMS TO THE CONTEXT MENU ***** //
    function addMenuItem(aNode, aObject, aIndex, aLabel, aMyValue) {
    	var mi = aNode.appendChild(document.createElement("menuitem"));
    // Notice that we are about to set the oncommand event (for the menu item created by this function) to call the setIndex function above.
    // The upshot of this is, when the menu item is clicked, the preference value is set to the menu item's index and the menu item becomes checked.
    	mi.setAttribute("oncommand", "document.popupNode.setIndex(this)");
    	mi.setAttribute("index", aIndex);
    	mi.setAttribute("label", aLabel);
    	mi.setAttribute("myvalue", aMyValue);
    	mi.setAttribute("type", "checkbox");
    	mi.setAttribute("autoCheck", false);
    }
    // ***** MOVES THE CB² CONTEXT MENU INTO A SUBMENU BELOW A MENU SEPERATOR AT THE END OF THE EXISTING CONTEXT MENU ***** //
    function copyMenuItems(node, id, separate) {
    	var menupopup = document.getElementById(id).cloneNode(true);
    	var menuitems = menupopup.childNodes.length;
    	for(var i = 0; i < menuitems; i++)
    	node.appendChild(menupopup.firstChild);
    	if(separate)
    	node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
    	var m = aNode.appendChild(document.createElement("menu"));
    	m.setAttribute("label", "Custom Button");
    	var mp = m.appendChild(document.createElement("menupopup"));
    	copyMenuItems(mp, "custombuttons-contextpopup");
    	aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    // ***** ADDS THE MENU ITEMS TO THE CONTEXT MENU ***** //
    const popupID = "cbContext-menutest";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.getIndex(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    // For our array of menu buttons, add each one to the context menu using our addMenuItem function from earlier
    for(var i = 0; i < this.ss.length; i++) {
    	addMenuItem(pop, this, i, this.ss[i].label, this.ss[i].myvalue);
    }
    // ***** EXTRA SHOW POPUP FUNCTION ***** // 
    // This is to facilitate handling of different mouse clicks and is set to the right click behaviour below.
    // It is not needed unless you are using onclick handling from within this initialization tab, as in this demo.
    this.showPopup = function(node) {
      var popup = document.getElementById("cbContext-menutest");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height + 24;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
      // Get the preference value
      var index = gPrefService.getIntPref("custombuttons.menutest.index");
      // Use this to pull out the value of the selected item from our menu item array
      var selectedvalue = this.ss[index].myvalue;
      // Show the value
      MyObj = createMsg(['title']);
      MyObj.aMsg('Currently checked option = '+selectedvalue);
    };
    this.rightclick = function(evt) 
    {
      this.showPopup(this);
    };
    // ***** INITIALISATION ***** //
    // Move the CB² context menu into the submenu
    cloneCBContext(pop);
    // Set the context menu to our context menu
    this.setAttribute("context", popupID);
    this.setAttribute('onclick', 'custombuttons.gQuot.mHandler(event, this)'); // Calls the Global MouseClick handler gQuot
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-rawny.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Public');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  117. Control Panel

    Code Tab

    /*Code*/

    Initialization Tab

    var label='Control Panel';
    var img='data:image/gif;base64,R0lGODlhEAAQAPfKAP///+Tk5Pn5+f7+/vb29tjY2JycnPz8/IbR/3t7ewFcygdo0XSSrqe9upPJ+pLG+AFUxB9AdhVWtOfn55ez3E6Byr/c8sXZ9i5DcXq29X9uboeHh+zq1K6zt5OTk9bW1pO99MvLy4m38dTQp5iorS87UuT2/3SJok1NTbLb/3up2pufotnY1zo/Sr+/vwVs1uzs7Eh/z4RdXL2/wLy8vMq6eObMzG6XtV6t++/v7yg+WC1uxw9PrXl5eXFxceXl5dFaMff9/zl4zjxyw8rr/+v2/9ra2pmZmfDw8JCdorK3tnaRkUN9z8Tj/yhAZ4CAgKioqLbN7SZow0l8yOru8cXGxP39/cbn/82wTneq4sLCwtG/dfL4/+rq6pG46ouVn6GhoYqx5tTs/zJHYOPq9tfl+CQ5YszXzJyfrXWJnMDAwP7//9WooyxTmhFlytzEdHqKmSpWn9/n2J6lqtni1/v7/G6AkyBivWlpaJeeptzTqGqWvb3h/4OQnmRkZHd3d2Oa1JSUlCk7WYq28C05VDxoluDp909PT9vz/xF014Ogszp5zI+Pj3p6eZO66YKcrMquT4KbqMTGx7Hb+nCIo+Py/NTKlbOzszc8Rk5gcglLqgFSvy+J5CpBWhtKgjGD0t3u9vv+/8HO6FCIx/Dy+VzC/1B8wy9WjbJYTWNsdho7aBFewO7292mU0dbXvIyMjMzMzNDQ0BxduKbB6Kenp/Pz8vj4+JbG8+z5/6Wssejlw3uVpHig3t/f34G26liRvuPj4/r4+py75VBTWODizNj0/46OjkaNy9GsPkeHyf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAMoALAAAAAAQABAAAAj/AJUpO1CLRRUlSXatyHFAoMAZJB7d+HXsU6IXmWggcahMEacFCiBsWjVl0ZgjEzgycDOkFQVRhkI56sQoAEdKMYIBALCGg65BOozZdHiCSR0AXHDpIQZC0CtgVNjYEJBGCKkgRSpZAuVFlR0VaICg+gBnBxlWJuhsIZJl1K0He2RouNRHSpk3rkbUiOTLQbJCqXoYiPXlzgU5WJA1WALI07AEUEL8IJBHVhREZyBNKpXBiQ8tMAQInCNhlpgmFvggwBHhj5EBDnPxEFbsSgoRFeKUaFQAtsAOmniFMdXGDCYUeAwMFSjpFAZCLQ75eQJGTS9bHJXB8rAhEC0XBboQBLCSPSAAOw==';
    var path='C:/WINDOWS/system32/control.exe';
    //var path='c:/windows/explorer.exe';
    var args='';
      this.label=label;
      this.setAttribute('oncommand','this.startProcess("'+path+'","'+args+'")');
      this.image=img;
      this.tooltipText = label;
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
    // file.launch();
     process.init(file);
     process.run(false,[args],1); 
    }
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/external-applications.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    null
  118. Convert this video

    Code Tab

    /*Code*/

    Initialization Tab

    // ***** VARS ***** //
    var button = this;
    var enabled = 0;
    // ***** FUNCTIONS ***** //
    function OpenConverter()
    {
      if (enabled == 1) {
        window.open("http://www.mediaconverter.org/firefox.php?url=" + escape(window.content.document.location.href),'Screenshot','height = 294px, width = 510px, resizable = false, scrollbars = no, toolbar = no, menubar = no, location = no, status = no');
      }
    }
    function CheckForMediaSite(event)
    {
      var website = window.content.location.href;
      var baseurl = website.replace(/(http:\/\/)?(https:\/\/)?(www\.)?/,"");
      if(baseurl.match(/blip\.tv\/file\/\d+|break\.com|dailymotion\.com|livevideo\.com\/video|metacafe\.com\/watch|myvideo\..+?\/watch|veoh\.com\/videos|youtube\.com\/watch|dumpalink\.com\/videos|kontraband\.com\/videos|lulu\.tv\/\?p=\d+|media\.putfile\.com|vidilife\.com\/video\_play|vids\.myspace\.com|zippyvideos\.com\/\d+/ig)) {
        enabled = 1;
        button.tooltipText = "Convert video";
        button.style.opacity = '1';
      }
      else {
        enabled = 0;
        button.tooltipText = "No video to convert";
        button.style.opacity = '.50';
      }
    }
    function Closed(event)
    {
      // Remove event listeners
      gBrowser.removeEventListener("load", CheckForMediaSite, true);
      gBrowser.tabContainer.removeEventListener("TabSelect", CheckForMediaSite, false);
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
      OpenConverter();
    };
    // ***** INITIALISATION ***** //
    CheckForMediaSite();
    window.onclose = Closed;
    gBrowser.tabContainer.addEventListener("TabSelect", CheckForMediaSite, false);
    gBrowser.addEventListener("load", CheckForMediaSite, true);
    this.setAttribute('onclick', 'custombuttons.gQuot.mHandler(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'custombuttons.gQuot.mHandler(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','2 (2009-04-22)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/convert-video.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  119. Cookie Culler/Clear Cache

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	deleteUnprotectedCookies();
    }
    this.midclick    = function(evt){
    	openDialog("chrome://cookieculler/content/CookieCuller.xul",
                     "CookieCuller",
                     "centerscreen, chrome, dialog=0, resizable"); 
    }
    this.rightclick  = function(evt){
    	function clearCache() {
        var classID = Components.classes["@mozilla.org/network/cache-service;1"];
        var cacheService = classID.getService(Components.interfaces.nsICacheService);
        cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY);
        cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK);
        }
      clearCache();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*---------------- uncomment to show mouseover effects ----------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20071006.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/cookie-culler-clear-cache.html');
    this.setAttribute('dependency','Cookie Culler');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText += '\n L:\tDelete Cookies \n M:\tOpen Cookie Manager \n R:\t Clear Cache ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/cookie-culler-clear-cache.html');

    Help Tab

    /*Help*/
         This button requires the "Cookie Culler" extension.
         https://addons.mozilla.org/en-US/firefox/addon/82
         Left: 	Clear unprotected cookies
         Middle: 	Opens cookie manager
         Right:	Clear cache
         Shift + R:	CustomButtons² context menu
         
  120. CookieCuller

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != "function") {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    if(typeof deleteUnprotectedCookies == "function") {
      let Msg = createMsg(this.label);
      let de = createDebug(this);
      /*----------------------- Custom Buttons² Mouse Handler ------------------------
        Remove the un-necessary Functions within this code block
        or the entire code block for very simple left click buttons.
          Replace the function call "Msg.aMsg("...")"
          within each needed Click Function with
          the function call of your choice.
          Your function call will then execute.
          Access to the click event Object (evt)
          provides you full control.
      ------------------------------------- -- -------------------------------------*/
      let Cb = custombuttons;
      let Cb2q = Cb.gQuot;
      this.leftclick = function(evt){
        openDialog("chrome://cookieculler/content/CookieCuller.xul",
                   "CookieCuller",
                   "centerscreen, chrome, dialog=0, resizable");
      };
      this.leftDclick = function(evt)
      {
        deleteUnprotectedCookies();
      };
    /*-------------------------- Show Focus Block Start --------------------------*/
      this.style.opacity = ".65";
      this.setAttribute("onmouseover","custombuttons.ButtonBrt(event);");
      this.setAttribute("onmouseout","custombuttons.ButtonDim(event);");
    /*--------------------------- Show Focus Block End ---------------------------*/
      this.tooltipText += ":: Enhanced Cookie Manager\n L\tOpen Cookie Culler";
    }
    else{
      custombuttons.alertSlide( "Cookie Culler Warning","CookieCuller is not installed or is disabled.");
      this.tooltipText += ":: CookieCuller is not installed or is disabled.";
      this.style.opacity = '.25';
      this.disabled = true;
    }
    this.setAttribute("onclick","custombuttons.gQuot.mHandler( event, this )"); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author","LouCypher, SCClockDr");
    this.setAttribute("version","Version");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/cookieculler.html');
    this.setAttribute("dependency","FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0.6*");
    this.setAttribute("status","Proto");
    this.setAttribute("public",true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

  121. Cookies

    Code Tab

    window.openDialog('chrome://browser/content/preferences/cookies.xul', 'Cookies', '', {filterString : Components.classes['@mozilla.org/network/effective-tld-service;1'].getService(Components.interfaces.nsIEffectiveTLDService).getBaseDomain(content.document.documentURIObject)});

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/cookies.html');

    Help Tab

  122. Copy Links/Convert to BBCode

    Code Tab

    /*Code*/

    Initialization Tab

    // kind of a strange way of decoding html entities, but it works.
    function html_entity_decode(str) {
      var tarea=content.document.createElement('textarea');
      tarea.innerHTML = str; return tarea.value;
      tarea.parentNode.removeChild(tarea);
    }
    // main function for populating clipboard with links onclick
    this.populateLinks = function(doc,clik) {
      var links=doc.getElementsByTagName('A');
      var strg='';
      MyObj = createMsg(this.label+" Error!");
      if(links.length < 1) {
        MyObj.aMsg("You must have only selected a single link,\n in order for this button to get the data it needs from a single link\n you must drag the link onto the button.\n\nTo use the selection feature please select more than one link."); 
        return;
      }
      for(var i=0;i<links.length;i++) {
        var link=links[i].href;
        var titl=links[i].innerHTML;
        rExp=/<(.*?)\>/g;
        if (rExp.test(titl)) titl=titl.replace(rExp,"");
        titl=html_entity_decode(titl);
        if(clik=='lft') {
          strg+='[url='+link+']'+titl+'[/url]\n';
        }
        else {
          var titlLink = link;
          if (titlLink.length > 48) titlLink = titlLink.substr(0,30) + "..." + titlLink.substr(titlLink.length-18);
          strg+='[url='+link+']'+titlLink+' - '+titl+'[/url]\n';
        }
      }
      custombuttons.gClipboard.write(strg);
      custombuttons.alertSlide(this.label,"Links copied to clipboard successfully");
    }
    // function to get selected area
    this.getSelectedSource = function() { // get the selected area
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var x = content.document.createElement("div");
      x.appendChild(winWrapper.getSelection().getRangeAt(0).cloneContents());
      return x;
    }
    // determine whether there is any selection as well as passing onclicks to main function
    this.generateLinks = function(clik) {
      var sel = this.getSelectedSource();
      if(!sel.innerHTML) {
        this.populateLinks(getBrowser().contentDocument,clik);
      }
      else {
        this.populateLinks(sel,clik);
      }
    }
    // drag/drop tell the dropped data what to be (text/html)
    this.getSupportedFlavours = function () {
      var flavours = new FlavourSet();
      flavours.appendFlavour("text/html");
      return flavours;
    }
    this.onDragOver = function(e,f,s){} // drag/drop just to allow dragging over
    // main drag/drop function for parsing dragged links
    this.onDrop = function(event,dDat,session){
      rExp=/.*?<a.*?href([\=\'\"\s]+)(http\:\/\/.*?)(\'|\").*?\>(.*?)(\<\/).*?$/i;
      var titl=dDat.data.replace(rExp,"$4");
      var link=dDat.data.replace(rExp,"$2");
      titl=html_entity_decode(titl);
      if(event.shiftKey) {
        var titlLink = link;
        if (titlLink.length > 48) titlLink = titlLink.substr(0,30) + "..." + titlLink.substr(titlLink.length-18);
        strg+='[url='+link+']'+titlLink+' - '+titl+'[/url]\n';
        var strg=dDat.data.replace(rExp,"[url="+link+"]"+titlLink+" - "+titl+"[/url]");
      }
      else {
        var strg=dDat.data.replace(rExp,"[url="+link+"]"+titl+"[/url]");
      }
      custombuttons.gClipboard.write(strg);
      custombuttons.alertSlide(this.label,"Links copied to clipboard successfully");
    }
    // global mouseclick handling
    this.leftclick = function(evt) {
      custombuttons.gClipboard.clear();
      this.generateLinks('lft');
    }
    this.midclick = function(evt) {
      custombuttons.gClipboard.clear();
      this.generateLinks('mid');
    }; this.cleftclick = function(evt) { this.midclick(evt); }
    // our tooltip
    this.tooltipText =  this.label + "\n" + 
                        "  L:\t[url=URL]TEXT[/url]\n" +
                        "  M:\t[url=URL]URL - TEXT[/url]\n" +
                        "――――――――――――――――――\n" +
                        "Without Selection: All links on Page\n" + 
                        "With Selection: Selected Links\n" +
                        "――――――――――――――――――\n" +
                        "Drag/Drop Single Links\n" +
                        "  Default:\t[url=URL]TEXT[/url]\n" +
                        "  Shift:\t[url=URL]URL - TEXT[/url]\n";
    // set the global handlers
    this.setAttribute('onclick', 'custombuttons.gQuot.mHandler(event, this )');
    this.setAttribute('ondblclick', 'custombuttons.gQuot.mHandler(event, this)');
    // set up our drag drop handlers
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    // do our opacity swap
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);");
    // button attributes
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081128.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/copy-linksconvert-bbcode.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/copy-linksconvert-bbcode.html');

    Help Tab

    Left (Valid URL Selected on Page)
        * TEXT
    Middle or Ctrl+Left
        * URL - TEXT (will crop url to 48 characters)
    Middle
        * All Links on Page are Converted
    Middle (With Page Selection)
        * Only Selected Links on Page are Converted
    Drag and Drop (with Left Button)
        * TEXT
    Drag and Drop (with Shift+Left Button)
        * URL - TEXT (will crop url to 48 characters)
  123. Copy rapidshare links

    Code Tab

    /* Code */
    var i;
    var matched;
    var tmpMatch;
    var mycontent= content.document.body.innerHTML;
    var regex = new RegExp("[\"']http:\/\/.*?rapidshare\.com\/files\/[0-9]*\/.*?[\"']","g");
    var finalUrls ="";
    matched = mycontent.match(regex);
    if (matched != null) {
      for (i=0; i<matched.length; i++) { 
        tmpMatch=matched[i].substring(1,matched[i].length-1);
        finalUrls=finalUrls+tmpMatch+"\r\n";
      } 
      gClipboard.write(finalUrls);
    }
    else {
      var regex = new RegExp("[\"'].*?http\%3A\%2F\%2F.*?rapidshare\.com\%2Ffiles\%2F[0-9]*\%2F.*?[\"']","g");
      var finalUrls ="";
      matched = mycontent.match(regex);
      if (matched != null) {
        for (i=0; i<matched.length; i++) { 
          tmpMatch=matched[i].substring(1,matched[i].length-1);
          finalUrls=finalUrls+tmpMatch+"\r\n";
        } 
        gClipboard.write(finalUrls);
      }
      else {
        alert('No Rapidshare links found on this page!');
      }
    }

    Initialization Tab

    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','m00k00');
    this.setAttribute('version','20071228.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/copy-rapidshare-links.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    null
  124. count open windows demo

    Code Tab

    /* 
    This is based around some code from Mozilla's developer centre: 
      http://developer.mozilla.org/en/nsIWindowMediator#Enumerating_windows
    I've tried to explain it to the best of my understanding
    */
    function CountWindows()
    {
            // Initialise count
    	var count = 0;
            // Basically sets wm to a list of the open browser windows
    	var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
    			   .getService(Components.interfaces.nsIWindowMediator);
            /* This can be used to enumerate through windows of different types: wm.getEnumerator(type)
               For example, "" means all and "navigator:browser" means browser windows, as I understand it */
    	var enumerator = wm.getEnumerator("navigator:browser");
            // While there are windows we haven't enumerated to/through/past...
    	while(enumerator.hasMoreElements()) {
                    //...go to the next one...
    		var win = enumerator.getNext();
                    //...and increment count
    		count = count + 1;
    	}
            //Set the function to return count when it is called
    	return count;
    }
    // Show a message displaying the number of open windows
    MyObj = createMsg(['title']);
    MyObj.aMsg('Number of open windows: '+CountWindows());

    Initialization Tab

    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','2');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-rawny.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  125. Counter Redirect

    Code Tab

    /*Code*/
    function load() {
      document.getElementById("textbox").value = window.arguments[1];
    }
    function gettextbox() {
      var element = document.getElementById("textbox");
      var start = element.selectionStart;
      var end = element.selectionEnd;
      if (end - start < 1) {
        return element.value;
      } else {
        return element.value.substr(start, end - start);
      }
    }
    function settextbox(string) {
      var element = document.getElementById("textbox");
      var start = element.selectionStart;
      var end = element.selectionEnd;
      if (end - start < 1) {
        document.getElementById("textbox").value = string;
      } else {
        var pre = element.value.substr(0, start);
        var post = element.value.substr(end, element.value.length);
        document.getElementById("textbox").value = pre + string + post;
      }
    }
    function base64encode() { /* alternate base64 encode method, btoa */
      var input = gettextbox();
      var output = "";
      var key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
      var chr1, chr2, chr3;
      var enc1, enc2, enc3, enc4;
      var i = 0;
      do {
        chr1 = input.charCodeAt(i++);
        chr2 = input.charCodeAt(i++);
        chr3 = input.charCodeAt(i++);
        enc1 = chr1 >> 2;
        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
        enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
        enc4 = chr3 & 63;
        if (isNaN(chr2)) {
          enc3 = enc4 = 64;
        } else if (isNaN(chr3)) {
          enc4 = 64;
        }
        output = output + key.charAt(enc1) + key.charAt(enc2) + key.charAt(enc3) + key.charAt(enc4);
      } while (i < input.length);
      settextbox(output);
    }
    function base64decode() { /* alternate base64 decode method, atob */
      var input = gettextbox();
      var output = "";
      var key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
      var chr1, chr2, chr3;
      var enc1, enc2, enc3, enc4;
      var i = 0;
      input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
      do {
        enc1 = key.indexOf(input.charAt(i++));
        enc2 = key.indexOf(input.charAt(i++));
        enc3 = key.indexOf(input.charAt(i++));
        enc4 = key.indexOf(input.charAt(i++));
        chr1 = (enc1 << 2) | (enc2 >> 4);
        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
        chr3 = ((enc3 & 3) << 6) | enc4;
        output = output + String.fromCharCode(chr1);
        if (enc3 != 64) {
          output = output + String.fromCharCode(chr2);
        }
        if (enc4 != 64) {
          output = output + String.fromCharCode(chr3);
        }
      } while (i < input.length);
      settextbox(output);
    }
    function rot13() {
      var input = gettextbox();
      var output = "";
      var chrin, chrout;
      for (var i = 0; i < input.length; i++) {
        chrin = input[i].charCodeAt(0);
        if (((chrin >= 65) && (chrin < 78)) || ((chrin >= 97) && (chrin < 110))) {
          chrout = chrin + 13;
        } else if (((chrin > 77) && (chrin <= 90)) || ((chrin > 109) && (chrin <= 122))) {
          chrout = chrin - 13;
        } else {
          chrout = chrin;
        }
        output = output + String.fromCharCode(chrout);
      }
      settextbox(output);
    }
    function split() { /* split url using the ? and & character */
      var input = gettextbox();
      var output = "";
      output = input.
        replace(/\?/g, "\n?").
        replace(/\&/g, "\n&");
      settextbox(output);
    }
    function copy() {
      window.arguments[0].gClipboard.write(document.getElementById("textbox").value.replace(/\n/g, "\r\n"));
    }
    function paste() {
      document.getElementById("textbox").value = window.arguments[0].gClipboard.read();
    }
    function clear() {
      document.getElementById("textbox").value = "";
    }
    function scheme() { /* generate data uri */
      var ioService = Components.classes["@mozilla.org/network/io-service;1"].
        getService(Components.interfaces.nsIIOService);
      var mimeService = Components.classes["@mozilla.org/mime;1"].
        getService(Components.interfaces.nsIMIMEService);
      var binaryInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].
        createInstance(Components.interfaces.nsIBinaryInputStream);
      var uri = ioService.newURI(document.getElementById("textbox").value, null, null);
      var channel = ioService.newChannelFromURI(uri);
      binaryInputStream.setInputStream(channel.open());
      if (channel instanceof Components.interfaces.nsIHttpChannel && channel.responseStatus != 200) {
        alert("response status code " + channel.responseStatus);
      } else {
        var binaryData = "";
        var readLength = binaryInputStream.available();
        while (readLength != 0) {
          binaryData = binaryData + binaryInputStream.readBytes(readLength);
          readLength = binaryInputStream.available();
        }
        try {
          var contentType = mimeService.getTypeFromURI(uri);
        } catch(e) {
          contentType = "text/plain"; /* default contentType */
        }
        var encodeData = btoa(binaryData);
        document.getElementById("textbox").value = "data:" + contentType + ";base64," + encodeData;
      }
      binaryInputStream.close();
    }
    function wrap() {
      var input = gettextbox();
      var output = "";
      output = input.replace(/(.{70})/g, "$1\n");
      settextbox(output);
    }
    function quote() {
      var input = gettextbox();
      var output = "";
      output = input.
        replace(/\n/g, "\x22 +\n\x22").
        replace(/^/, "\x22").
        replace(/$/, "\x22;");
      settextbox(output);
    }
    function indent() {
      var input = gettextbox();
      var output = "";
      output = input.
        replace(/\n/g, "\n  ").
        replace(/^/, "  ");
      settextbox(output);
    }
    function execute() {
      window.opener.getBrowser().addTab(gettextbox());
    }
    function executefocus() {
      window.opener.focus();
      window.opener.getBrowser().selectedTab = window.opener.getBrowser().addTab(gettextbox());
    }
    function executeclose() {
      window.close();
      window.opener.getBrowser().selectedTab = window.opener.getBrowser().addTab(gettextbox());
    }

    Initialization Tab

    /*Initialization code*/
    var kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    var contextMenu = document.getElementById("contentAreaContextMenu");
    var onLinkItem = document.createElementNS(kXULNS, "menuitem");
    removeElementById("counter-redirect-onlink"); //prevent duplicate context menu item
    onLinkItem.setAttribute("id", "counter-redirect-onlink");
    onLinkItem.setAttribute("label", "Counter Redirect");
    onLinkItem.setAttribute("accesskey", "R");
    //insert "Counter Redirect" item after "Copy Link Location" item in the onLink context menu
    contextMenu.insertBefore(onLinkItem, document.getElementById("context-copylink").nextSibling);
    custombuttons.listeners.onLinkListener = contextMenu; //prevent memory leak
    custombuttons.listeners.onLinkListener.addEventListener("popupshowing", function(event) {
      onLinkItem.hidden = !(gContextMenu.onLink);
    }, false);
    onLinkItem.onclick = function(event) {
      redirectLink(gContextMenu.linkURL);
    }
    function removeElementById(id) {
      var element = document.getElementById(id);
      if (element) {
        element.parentNode.removeChild(element);
      }
    }
    function redirectLink(address) {
      if (address.search(/=http(:|\x253a)/i) > -1) {
        address = address.replace(/.*=(http.*)/i, "$1");
        gBrowser.addTab(unescape(address));
      } else if (address.search(/=uggc(:|\x253a)/i) > -1) {
        address = address.replace(/.*=(uggc.*)/i, "$1");
        gBrowser.addTab(rot13(unescape(address)));
      } else if (address.search(/=.?[aS][HF]R[0U][cU][^&?~]*[&?~]/) > -1) {
        address = address.replace(/.*=.?([aS][HF]R[0U][cU][^&?~]*)[&?~].*/, "$1");
        gBrowser.addTab(unescape(base64decode(address)));
      } else if (address.search(/custombutton:/) == 0) {
        gBrowser.addTab("view-source:data:text/xml," + address);
      } else {
        dialogBox(address);
      }      /* rot13 of http is uggc
                rot13 of HTTP is UGGC
        base64 encode of http is aHR0cA==
        base64 encode of HTTP is SFRUUA== */
    }
    function rot13(input) {
      var output = "";
      var chrin, chrout;
      for (var i = 0; i < input.length; i++) {
        chrin = input[i].charCodeAt(0);
        if (((chrin >= 65) && (chrin < 78)) || ((chrin >= 97) && (chrin < 110))) {
          chrout = chrin + 13;
        } else if (((chrin > 77) && (chrin <= 90)) || ((chrin > 109) && (chrin <= 122))) {
          chrout = chrin - 13;
        } else {
          chrout = chrin;
        }
        output = output + String.fromCharCode(chrout);
      }
      return output;
    }
    function base64decode(input) { /* alternate base64 decode method, atob */
      var output = "";
      var key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
      var chr1, chr2, chr3;
      var enc1, enc2, enc3, enc4;
      var i = 0;
      input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
      do {
        enc1 = key.indexOf(input.charAt(i++));
        enc2 = key.indexOf(input.charAt(i++));
        enc3 = key.indexOf(input.charAt(i++));
        enc4 = key.indexOf(input.charAt(i++));
        chr1 = (enc1 << 2) | (enc2 >> 4);
        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
        chr3 = ((enc3 & 3) << 6) | enc4;
        output = output + String.fromCharCode(chr1);
        if (enc3 != 64) {
          output = output + String.fromCharCode(chr2);
        }
        if (enc4 != 64) {
          output = output + String.fromCharCode(chr3);
        }
      } while (i < input.length);
      return output;
    }
    function dialogBox(content) {
      var tag = new Array("<script><!\x5bCDATA\x5b", "\x5d\x5d></script>");
      var xml = helpTab.replace("</window>", tag[0] + codeTab + tag[1] + "</window>");
      var url = "data:application/vnd.mozilla.xul+xml;text/plain," + xml;
      var feature = "chrome,centerscreen,width=960,height=600,dialog=no";
      var arg0 = custombuttons;
      var arg1 = unescape(content);
      window.openDialog(url, "", feature, arg0, arg1);
    }
    var codeTab = document.getElementById(this.id).getAttribute("cb-oncommand");
    var helpTab = document.getElementById(this.id).getAttribute("Help");
    this.leftclick = function(event) {
      dialogBox(content.document.location.href);
    }
    this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/counter-redirect.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.0.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

    <?xml version="1.0"?>
    <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    <window title="Edit" onload="load();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
      <keyset>
        <key keycode="VK_ESCAPE" oncommand="window.close();" />
        <key keycode="VK_F1" oncommand="scheme();" />
        <key keycode="VK_F2" oncommand="wrap();" />
        <key keycode="VK_F3" oncommand="quote();" />
        <key keycode="VK_F4" oncommand="indent();" />
        <key keycode="VK_F5" oncommand="execute();" />
        <key keycode="VK_F6" oncommand="executefocus();" />
      </keyset>
      <vbox flex="1" >
        <textbox id="textbox" multiline="true" style="font-family: monospace" wrap="off" flex="1" />
        <hbox>
          <button label="Base64 Encode" oncommand="base64encode();" flex="3" />
          <button label="Base64 Decode" oncommand="base64decode();" flex="3" />
          <button label="Rot13" oncommand="rot13();" flex="1" />
          <button label="Load" oncommand="load();" flex="1" />
          <button label="Split" oncommand="split();" flex="1" />
          <button label="Execute" oncommand="executeclose();" flex="1" />
          <button label="Copy" oncommand="copy();" flex="1" />
          <button label="Paste" oncommand="paste();" flex="1" />
          <button label="Clear" oncommand="clear();" flex="1" />
        </hbox>
      </vbox>
    </window>
  126. Custom Button Links

    Code Tab

    this.value="http://custombuttons.phpbbnow.com/";
    gBrowser.selectedTab = gBrowser.addTab(event.target.value);

    Initialization Tab

    var apps,srcUrl,MItem,mPop;
    srcUrl='http://www.google.com';
    //------menu items--------
    apps=new Array;
    apps.push(['Mozilla Zine Thread','http://forums.mozillazine.org/viewtopic.php?t=428688']);
    apps.push(['RSS Feed','http://custombuttons.phpbbnow.com/rss.php']);
    apps.push(['Firefox Buttons','http://custombuttons.phpbbnow.com/viewforum.php?f=1']);
    apps.push(['Thunderbird Buttons','http://custombuttons.phpbbnow.com/viewforum.php?f=2']);
    apps.push(['Requests and Ideas','http://custombuttons.phpbbnow.com/viewforum.php?f=10']);
    apps.push(['Private Messages','http://custombuttons.phpbbnow.com/privmsg.php?folder=inbox']);
    //------/menu items-------
    MItem=function(label,path){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      mItem.id = path;
      mItem.value = path;
      mItem.tooltipText = path;
      return mItem;
    }
    this.onMouseOver = function() {
      var homePage = gHomeButton.getHomePage();
      homePage = homePage.replace(/\|/g,', ');
      this.tooltipText = "Custom Button links";
    }
    //this.orient="vertical";
    mPop=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mPop.appendChild(document.createElement('menuseparator'));
     }else{
      if (!apps[i] [2]) apps[i] [2]=srcUrl;
      mPop.appendChild(MItem(apps[i] [0],apps[i] [1]));
     }
    }
    this.setAttribute("onmouseover", "this.onMouseOver()");
    this.appendChild(mPop);
    this.type = "menu-button";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/link-menus.html');

    Help Tab

  127. Custom Buttons² Context Menu Demo

    Code Tab

    /*Code*/

    Initialization Tab

    var Cb = custombuttons;
    // Two functions for testing, this.one() and this.two()
    this.one = function() {
      var Msg = createMsg(this.label);
      Msg.aMsg("Function 1");
    }
    this.two = function() {
      custombuttons.alertSlide("Function 2", "It throws up a different alert");
    }
    // Our menu items
    this.ss = [
      { label: 'MenuItem 1', cmd: 'document.popupNode.one()', sItemId: '' },
      { label: 'MenuItem 2'  , cmd: 'document.popupNode.two()', sItemId: '' }];
    // Our Initialization function for creating the context menu, setting up menuitems and telling
    // custombuttons2 extension to put cb context in a submenu
    this.mObj = Cb.getCbContextObj(this);
    this.init = function(x) {
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        mItem = x.mObj.insertBefore(nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute('oncommand',x.ss[i].cmd)
      }
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.setAttribute('onclick', 'custombuttons.gQuot.mHandler(event, this)');
    this.setAttribute('ondblclick', 'custombuttons.gQuot.gShowPopup(this);');
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081119.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/custom-buttons2-context-menu-demo.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/custom-buttons2-context-menu-demo.html');

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  128. Custom Buttons² Forum Chat

    Code Tab

    var ircserv = "irc.mozilla.org", ircchan = escape("#custombuttons2");
    var username = "";
    username = username.replace(" ", "_");
    var url = "http://embed.mibbit.com/e/index.html?server="+escape(ircserv)+"&amp;channel="+ircchan+"&amp;nick="+username+"&amp;chatOutputShowTimes=false";
    this.bottomPanel(url);

    Initialization Tab

    /* -------------------------------------------------------------
         Bottom Panel Function
         by LouCypher (aka Zoolcar9)
         Opens URL in a bottom panel
       ------------------------------------------------------------- */
    this.bottomPanel = function(url, contextmenu) {
      var panelID = "bottom-panel";
      var gPanel = document.getElementById(panelID);
      if(gPanel) {
        if(gPanel.firstChild.getAttribute("src").indexOf(url) == -1) {
          gPanel.firstChild.setAttribute("src", url);
          if(contextmenu) gPanel.setAttribute("contextmenu", contextmenu);
          else gPanel.removeAttribute("contextmenu");
        } else {
          gPanel.parentNode.removeChild(gPanel.previousSibling);
          gPanel.parentNode.removeChild(gPanel);
        }
      } else {
        var tbb = document.createElement("toolbarbutton");
            tbb.className = "tabs-closebutton";
            tbb.style.cursor = "pointer";
            tbb.setAttribute("oncommand",
                "this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); " +
                "this.parentNode.parentNode.removeChild(this.parentNode)");
        var spr = document.createElement("spacer");
            spr.setAttribute("flex", 1);
        var spl = document.createElement("splitter");
            spl.height = "28px";
            spl.appendChild(spr);
            spl.appendChild(tbb);
        var ifr = document.createElement("iframe");
            ifr.setAttribute("flex", 1);
            ifr.setAttribute("src", url);
        var box = document.createElement("box");
            box.id = panelID;
            box.height = "300px";
            box.appendChild(ifr);
        if(contextmenu) box.setAttribute("contextmenu", contextmenu);
        gBrowser.parentNode.appendChild(spl);
        gBrowser.parentNode.appendChild(box);
      }
    }  
    this.tooltipText = 'Show CB² Forum Chat in bottom panel';
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas, LouCypher');						                                   // Stores Author.
    this.setAttribute("version",'20090304.00');                                                 	                                   // Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/custom-buttons2-forum-chat-button.html');  // Stores Homepage.
    this.setAttribute("dependency",'FF 2.0,CB 2.0.*');						                                   // Stores Dependency.
    this.setAttribute("status",'Complete');								                                   // Stores Devstatus.
    this.setAttribute("public",true);								                                   // Stores Public.

    Help Tab

    *******************************************************	
     L = Toggle the Custom Button² Forum Chat in the Bottom Panel	
     R = CB Context Menu
  129. Custom forum Tags

    Code Tab

    this.siteGo(event);

    Initialization Tab

    var limit=10;
    var img="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAADwMZRfAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACq0lEQVR4nJ3ObSzUARwH8K+HqBndosMuTw05NyGmK84L1KahzUaRlnM9kUMcHfI0qatmiormKVMp0tUrT5VetNbq1Bar1tBMcp7yVI57+P96cy9qWnX9tu+r376f3w/4z2F0qu5HnU3WAEwMKhKRORE5q1fm+YxOpZobb6kbHqiINBThaDQrWVrNQg8REekWtCtz7Z8MQgCgtq6OXVMt7FxWSuhlN5dqK1zIIKCxuSVUWnp2SHZ+Py2NRFCVzJmqLzgx/wzcabtnLpKWqoUZ2fSxT0gr0xXUcNmZaah0GfhrubK2QZRaKJuPS88lHj+cAoJ3UWNNJLM8KdMxmjGmV+419keg9NK1mwmZBRSbkkM7wuOIxeFRuiTt66zy8Xh7k8/zrtatoycOszNWFZtb26xkVdfLE7OLGUFkArn6hpClHZfCow9oJ5TDCq16domI6NuoeOJFd1izj/f6LauQnLJyRWyqlKISxcRx304sDpei45ImCk5npx9LDro63r9zRLv8Ticr2vQ0M81Rxg/azP8FaJJ3pcSlSiksJok8/HfTBgceiTOyFbEx0XuCBX5eHa18xdT7vZ2qz6IZ8VGbIzxPC56RsakNJpe1EYNz2rFxNdHodyION5hgyiK/wJAZAB4Cga1vca7DKUWP1wdGO8v093Kny/KsOwDYA1gHwAh9XxbTBhd1JH81RGfqO8gxMJH2HRS9jY+PjwLA9nAzs0wW2djIm7xD3/Twpoqk7nnbfCz8AbAAmAIAbt9/aHmj6/WA5OItEmado44nz+7y+fwAAM4AzAAYATAGsDZfYl8PwBWAHYA1+h0AwOSQ6LjTlYaWlsLikpMAvAC4AODoX/45juq5B0MqZckCALYeAgBYAbAF4A7AFwAXgJv+4u/imZ/JbgfAA7ARAH4AiGMzOb6raJkAAAAASUVORK5CYII=";
    var apps=new Array;
    //apps.push(['separator']);
    //apps.push(['anchor','[anchor]{NAME}[/anchor]',img]);
    //apps.push(['goto=','[goto={ANCHOR NAME}]{TEXT}[/goto]',img]);
    apps.push(['url=','[url={LINK}]{TEXT}[/url]',img]);
    //apps.push(['ifr=','[ifr={URL}]{HEIGHT TEXT}[/ifr]',img]);
    //apps.push(['iframe=','[iframe={URL}]{WIDTH TEXT},{HEIGHT NUMBER},{BORDER NUMBER}[/iframe]',img]);
    //apps.push(['separator']);
    apps.push(['base64 image','[img]{TEXT}[/img]',img]);
    //apps.push(['imgwrap=','[imgwrap={TEXT}]{IMAGE}[/imgwrap]',img]);
    apps.push(['separator']);
    apps.push(['align= ','[align={WHERE}]{TEXT TO ALIGN}[/align]',img]);
    apps.push(['center','[center][/center]',img]);
    apps.push(['left','[justify]{TEXT}[/justify]',img]);
    apps.push(['right','[right]{TEXT}[/right]',img]);
    apps.push(['justify','[justify]{TEXT}[/justify]',img]);
    apps.push(['separator']);
    apps.push(['table','[table]{TABLE ELEMENTS}[/table]',img]);
    apps.push(['td','[td]{CELL}[/td]',img]);
    apps.push(['th','[th]{HEADING}[/th]',img]);
    apps.push(['tr','[tr]{ROW ELEMENTS}[/tr]',img]);
    apps.push(['separator']);
    apps.push(['toggle=','[toggle={PROMPT}]{TOGGLED TEXT}[/toggle]',img]);
    apps.push(['edit=','[edit=SCClockDr,3,'+Date().toLocaleString()+']{SUMMARY OF EDIT}[/edit]',img]);
    //apps.push(['note','[note]{COMMENT}[/note]',img]);
    apps.push(['del','[s]{TEXT}[/s]',img]);
    apps.push(['xpi=','[xpi={NUMBER}]{TEXT},{TEXT2}[/xpi]',img]);
    apps.push(['[*]','[*]',img]);
    apps.push(['Custom Buttons²','Custom Buttons²',img]);
    this.nItem=function(label,value,name,img){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      mItem.value = value;
      mItem.tooltipText = label;
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',img);
      mItem.setAttribute('name',name);
      return mItem;
    }
    this.mPop=document.createElement('menupopup');
    	for (var i=0;i<apps.length;i++){
    	 if (apps[i] =='separator'){
    		  this.mPop.appendChild(document.createElement('menuseparator'));
    	 }else{
    		  this.mPop.appendChild(this.nItem(apps[i] [0],apps[i] [1],'Permanent',apps[i] [2]));
    	 }
    	}
    this.siteGo=function(evt)
    {
    	var site=evt.target.value;
    	this.pasteItem(site);
    }
    this.pasteItem= function(value) {
    var theBox = document.commandDispatcher.focusedElement;
    var startPos = theBox.selectionStart;
    var endPos = theBox.selectionEnd;
    var oPosition = theBox.scrollTop;
    var oHeight = theBox.scrollHeight;
    var text=theBox.value.substring(0,startPos);
    var nHeight = theBox.scrollHeight - oHeight;
    var str = value;
    text +=str;
    text +=theBox.value.substring(endPos, theBox.value.length);
    theBox.value = text;
    theBox.selectionStart = startPos + str.length;
    theBox.selectionEnd = startPos + str.length;
    theBox.scrollTop = oPosition + nHeight;
    }
    this.appendChild(this.mPop);
    this.type = "menu";
    this.setAttribute("class", "menu-iconic");
    this.value=-1;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/custom-forum-tags2-button.html');

    Help Tab

  130. Custom User Style Editor

    Code Tab

    extOpenDialog('chrome://ctxextensions/content/styleSheetsManager/customUserStyleEditor.xul', 'ctxextensions:customUserStyleEditor');

    Initialization Tab

    if(typeof ExtService == "object") return;
    var ext = "ContextMenu Extensions";
    var err = ext + " extension is not installed or is disabled.";
    this.setAttribute("oncommand",
      "alert('" + err + "'); " +
      "this.disabled = true; " +
      "this.style.opacity = '.25';"
    );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/custom-user-style-editor.html');

    Help Tab

  131. Customize Toolbar

    Code Tab

    /*Code*/

    Initialization Tab

    this.execute=function()
    {
    	  if(typeof CustomizeMailToolbar == "function")
     		 CustomizeMailToolbar("mail-toolbox");
    	  else
      		BrowserCustomizeToolbar();
    }
    this.setAttribute("oncommand", "this.execute(event);");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/customize-toolbar-button.html');

    Help Tab

  132. Customize Toolbar & Bookmarks Manager All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    BrowserCustomizeToolbar();
    }
    this.rightclick = function(e) {
    document.getElementById('bookmarksShowAll').click();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Customize Toolbar|R: Bookmarks Manager|M: Go Menu";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/customize-toolbar-bookmarks-manager-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    null
  133. data:URI Generator

    Code Tab

    this.getDataURI();

    Initialization Tab

    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                                  .getService(Components.interfaces.nsIPromptService);
    function selectedText() {
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var string = winWrapper.getSelection();
      if(string == "") return;
      return string;
    }
    function getText() {
      var str = selectedText() || readFromClipboard();
      return str;
    }
    function getInput(aText, aCheckText, aFlag, aCheck) {
      return promptService.confirmEx(window, "data:URI", aText, aFlag,
                                     "Button_0", "Button_1", "Button_2",
                                     aCheckText, aCheck);
    }
    function getContentType() {
      var title = "data:URI";
      var text = "MIME type";
      var type = ["Plain text", "Web page", "XML", "XUL",
                  "JavaScript", "Image", "Other"];
      var mime = ["text/plain", "text/html", "text/xml",
                  "application/vnd.mozilla.xul+xml",
                  "application/x-javascript", "image/jpeg"];
      var selected = {};
      var result = promptService.select(null, title, "Select " + text,
                                        type.length, type, selected);
      if (result) {
        var idx = selected.value;
        if (!mime[idx]) {
          var ctype = prompt("Enter " + text + ", example: text/html", "", title);
          if (ctype) return ctype;
          return;
        }
        return mime[idx];
      }
    }
    this.getDataURI = function() {
      if(!getText()) {
        alert("No text in clipboard or no text selected.");
        return;
      }
      var title = "data:URI";
      var prefix = "data:"
      var ctype = getContentType();
      if (!ctype) return;
      prefix += ctype;
      var charset = prompt("Character Set", "utf-8", prefix)
      if(charset == null) return;
      charset = charset == "" ? "" : ";charset=" + charset;
      prefix += charset;
      var checkBase64 = {value:true};
      var flagBase64 = 0;
      var doIt = getInput(prefix, "Base 64", flagBase64, checkBase64);
      if(doIt) return;
      var base64 = checkBase64.value;
      var encode = base64 ? encodeURIComponent(btoa(getText())) : encodeURIComponent(getText());
      var dataURI = "data:" + ctype + charset + (base64 ? ";base64" : "") + "," + encode;
      gBrowser.selectedTab = gBrowser.addTab(dataURI);
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/datauri-generator.html');
    

    Help Tab

  134. data:URI generator²

    Code Tab

    /*
      This is my version of the data:URI Generator button by Jason Barnabe, LouCypher and SCClockDr:
      http://custombuttons2.com/forum/post712.html#p712
      Original text:
      "
    	Original Image
    	chrome://custombuttons/skin/button.png
    	Originally written by Jason Barnabe at
    	http://blog.userstyles.org/2007/01/28/creating-a-data-uri-from-a-file/
    	Via LouCypher		http://custombuttons.phpbbnow.com/viewtopic.php
    	CB Regular
    	Joined: 10 Aug 2006
    	Location: Jakarta, Indonesia (GMT+7)
    	http://custombuttons.phpbbnow.com/viewtopic.php?t=471
    	This function returns a base 64-encoded data URI from the passed nsIFile.
    	The Location in the Properties of the generated image is the base64 code.
    	See http://en.wikipedia.org/wiki/Data:_URI_scheme
    	See http://developer.mozilla.org/en/docs/nsIFile
      "
      The main difference is that I've added some code to support conversion of images dragged and dropped onto the button.
      Rawny ^^
    */
    this.loadDataURI();

    Initialization Tab

    var Cc = Components.classes;
    var Ci = Components.interfaces;
    var img;
    function getFile() {
      const nsIFilePicker = Ci.nsIFilePicker;
      var fp = Cc['@mozilla.org/filepicker;1'].
               createInstance(nsIFilePicker);
      fp.init(window, gNavigatorBundle.getString("openFile"),
                       nsIFilePicker.modeOpen);
      fp.appendFilters(nsIFilePicker.filterAll |
                       nsIFilePicker.filterText |
                       nsIFilePicker.filterImages |
                       nsIFilePicker.filterXML |
                       nsIFilePicker.filterHTML);
      fp.appendFilter("JavaScript", "*.js");
      fp.appendFilter("CSS", "*.css");
      fp.appendFilter("XUL", "*.xul");
      if (fp.show() == nsIFilePicker.returnCancel) return;
      var localFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
      localFile.initWithPath(fp.file.path);
      return localFile;
    }
    function generateDataURI(aFile) {
      var contentType = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService).getTypeFromFile(aFile);
      var inputStream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(Ci.nsIFileInputStream);
      inputStream.init(aFile, 0x01, 0600, 0);
      var stream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(Ci.nsIBinaryInputStream);
      stream.setInputStream(inputStream);
      var encoded = btoa(stream.readBytes(stream.available()));
      return "data:" + contentType + ";base64," + encoded;
    }
    this.loadDataURI = function() {
      var file = getFile();
      if (!file) return;
      img = file;
      ConvertImg();
    }
    this.getSupportedFlavours = function () {
      var flavours = new FlavourSet();
      flavours.appendFlavour("text/html");
      return flavours;
    }
    function GetImageFromURL(url) { 
      var filename = url.substring(url.lastIndexOf("/")+1,url.length);
      var file = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
      file.append(filename);
      file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
      var wbp = Cc['@mozilla.org/embedding/browser/nsWebBrowserPersist;1'].createInstance(Ci.nsIWebBrowserPersist);
      var ios = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService);
      var uri = ios.newURI(url, null, null);
      wbp.saveURI(uri, null, null, null, null, file);
      return file;
    }
    function ConvertImg() {
      var dataURI = generateDataURI(img);
      //gBrowser.loadOneTab(dataURI, null, null, null, false);
      gClipboard.write(dataURI);
    }
    function test(input) {
      alert(input);
    }
    this.onDragOver = function(e,f,s){}
    this.onDrop = function(event,dDat,session) {
      var SrcRegEx = /(.*?)\ssrc\=(\'|\")(.*?)(\'|\")(.*)/i;
      var ImgRegEx = /^(http\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(?:\/\S*)?(?:[a-zA-Z0-9_])+\.(?:jpg|jpeg|gif|png))$/; 
      var data = dDat.data;
      var src = data.replace(SrcRegEx, "$3");
      if (ImgRegEx.test(src) == false) {
        custombuttons.alertBox("data:URI generator","Dragged object is not an image file");
        return;
      }
      img = GetImageFromURL(src);
      setTimeout(ConvertImg, 1);
    }
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.tooltipText = 'data:URI Generator';
    this.setAttribute('author','Rawny, Jason Barnabe, LouCypher, SCClockDr');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/datauri-generator2.html');
    this.setAttribute('dependency','');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    This button converts image files to base64 format.	
    Clicking the button opens the File Picker Dialog.
    You can then browse through your Hard Drive to select an image file to convert.
    You can also insert a URL into the "File name" field to convert an image from the internet.
    Additionally you can now drag and drop an image onto the button to convert it.
  135. data:URI generator²

    Code Tab

    /*
      This is my version of the data:URI Generator button by Jason Barnabe, LouCypher and SCClockDr:
      http://custombuttons2.com/forum/post712.html#p712
      Original text:
      "
    	Original Image
    	chrome://custombuttons/skin/button.png
    	Originally written by Jason Barnabe at
    	http://blog.userstyles.org/2007/01/28/creating-a-data-uri-from-a-file/
    	Via LouCypher		http://custombuttons.phpbbnow.com/viewtopic.php
    	CB Regular
    	Joined: 10 Aug 2006
    	Location: Jakarta, Indonesia (GMT+7)
    	http://custombuttons.phpbbnow.com/viewtopic.php?t=471
    	This function returns a base 64-encoded data URI from the passed nsIFile.
    	The Location in the Properties of the generated image is the base64 code.
    	See http://en.wikipedia.org/wiki/Data:_URI_scheme
    	See http://developer.mozilla.org/en/docs/nsIFile
      "
      The main difference is that I've added some code to support conversion of images dragged and dropped onto the button.
      Rawny ^^
    */
    this.loadDataURI();

    Initialization Tab

    var Cc = Components.classes;
    var Ci = Components.interfaces;
    var img;
    function getFile() {
      const nsIFilePicker = Ci.nsIFilePicker;
      var fp = Cc['@mozilla.org/filepicker;1'].
               createInstance(nsIFilePicker);
      fp.init(window, gNavigatorBundle.getString("openFile"),
                       nsIFilePicker.modeOpen);
      fp.appendFilters(nsIFilePicker.filterAll |
                       nsIFilePicker.filterText |
                       nsIFilePicker.filterImages |
                       nsIFilePicker.filterXML |
                       nsIFilePicker.filterHTML);
      fp.appendFilter("JavaScript", "*.js");
      fp.appendFilter("CSS", "*.css");
      fp.appendFilter("XUL", "*.xul");
      if (fp.show() == nsIFilePicker.returnCancel) return;
      var localFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
      localFile.initWithPath(fp.file.path);
      return localFile;
    }
    function generateDataURI(aFile) {
      var contentType = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService).getTypeFromFile(aFile);
      var inputStream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(Ci.nsIFileInputStream);
      inputStream.init(aFile, 0x01, 0600, 0);
      var stream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(Ci.nsIBinaryInputStream);
      stream.setInputStream(inputStream);
      var encoded = btoa(stream.readBytes(stream.available()));
      return "data:" + contentType + ";base64," + encoded;
    }
    this.loadDataURI = function() {
      var file = getFile();
      if (!file) return;
      img = file;
      ConvertImg();
    }
    this.getSupportedFlavours = function () {
      var flavours = new FlavourSet();
      flavours.appendFlavour("text/html");
      return flavours;
    }
    function GetImageFromURL(url) { 
      var filename = url.substring(url.lastIndexOf("/")+1,url.length);
      var file = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
      file.append(filename);
      file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
      var wbp = Cc['@mozilla.org/embedding/browser/nsWebBrowserPersist;1'].createInstance(Ci.nsIWebBrowserPersist);
      var ios = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService);
      var uri = ios.newURI(url, null, null);
      wbp.saveURI(uri, null, null, null, null, file);
      return file;
    }
    function ConvertImg() {
      var dataURI = generateDataURI(img);
      //gBrowser.loadOneTab(dataURI, null, null, null, false);
      gClipboard.write(dataURI);
    }
    function test(input) {
      alert(input);
    }
    this.onDragOver = function(e,f,s){}
    this.onDrop = function(event,dDat,session) {
      var SrcRegEx = /(.*?)\ssrc\=(\'|\")(.*?)(\'|\")(.*)/i;
      var ImgRegEx = /^(http\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(?:\/\S*)?(?:[a-zA-Z0-9_])+\.(?:jpg|jpeg|gif|png))$/; 
      var data = dDat.data;
      var src = data.replace(SrcRegEx, "$3");
      if (ImgRegEx.test(src) == false) {
        custombuttons.alertBox("data:URI generator","Dragged object is not an image file");
        return;
      }
      img = GetImageFromURL(src);
      setTimeout(ConvertImg, 1);
    }
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.tooltipText = 'data:URI Generator';
    this.setAttribute('author','Rawny, Jason Barnabe, LouCypher, SCClockDr');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/datauri-generator2.html');
    this.setAttribute('dependency','');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    This button converts image files to base64 format.	
    Clicking the button opens the File Picker Dialog.
    You can then browse through your Hard Drive to select an image file to convert.
    You can also insert a URL into the "File name" field to convert an image from the internet.
    Additionally you can now drag and drop an image onto the button to convert it.
  136. Date-Time Stamp

    Code Tab

    /* Date-Time Stamp */
    (function()
    {var t=new Date();
    content.document.body.innerHTML = "<table width=100%><tr><td align=right>" + t + "</td></tr></table>" + content.document.body.innerHTML;}
    )();
    /*  The original bookmarklet
    javascript:(function(){var t=new Date();document.body.innerHTML = "<table width=100%><tr><td align=right>" + t + "</td></tr></table>" + document.body.innerHTML;})()
    */

    Initialization Tab

    this.tooltipText = "L: Insert date-time stamp";
    this.setAttribute('author','cblover');
    this.setAttribute('version','1 (2009-04-22)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/date-time-stamp.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, FF1.5*, FL2.0*, CB2 3.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Left click the button to insert a date-time stamp in the upper right hand corner of the current web page.
  137. deBug Buttons

    Code Tab

    /*Code*/
      

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension.".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons2 Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.initId = "";
    let Cb2s = custombuttons.CbStr;
    let Cb = custombuttons;
    Cb.deBug = false;
    this.leftclick   = function(evt)
    {
      let Cb = custombuttons;
      Cb.deBug = true;
      var tbChildren = custombuttons.getCustombuttonNodes();
      let oBtn = {};
      var but = {};
      var id = "";
      for (let j=0;j<tbChildren.length;j++){
        but = tbChildren[j];
        if (but) {
          id = but.getAttribute("id");
          oBtn = document.getElementById(id);
          if (isCbL(oBtn)&& oBtn.id !== this.id){ initButton(but);} else if (isCbL(oBtn)) {Components.utils.reportError("deBug Button " + Cb.getNumber(oBtn.id) + " Skipped");}  // Our Kind of button
        }
      } // End for each
    };
    this.midclick    = function(evt)
    {
      Components.utils.reportError("Start Run: \n");
      let Cb = custombuttons;
      Cb.deBug = false;
      var tbChildren = custombuttons.gToolbox.palette.childNodes;
      let oBtn = {};
      var but = {};
      var id = "";
      for (let j=0;j<tbChildren.length;j++){
        but = tbChildren[j];
        if (but) {
          id = but.getAttribute("id");
          oBtn = document.getElementById(id);
          if (isCbL(oBtn)&& oBtn.id !== this.id) initButton(but);  // Our Kind of button
        }
      } // End for each
      Components.utils.reportError("End Run: \n");
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons2 Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
      function isCbL(button)
      {
        if (button){
          let rExp = /custombuttons-button/;
          return rExp.test(button.id);
        }
        return false;
      }
      function isCbA(button)
      {
        let rExp = /custombuttons-button/;
        return rExp.test(button.getAttribute("id"));
      }
      /**  initButton( oBtn )
       Author:    George Dunham aka: SCClockDr
       Scope:     private
       Args:	    oBtn -
       *		
       Returns:   Nothing
       Called by: 1. 
       Purpose:   1. 
       TODO:      1. 
       */
      function initButton(oBtn) //{{{
      {
          //updated
        try{
          // if ( this.bToolTipId  == null)
          oBtn.removeAttribute("oncommand");
          /*[/strange firefox behaviour]*/
          // oBtn.setAttribute("oncommand","eval(this.getAttribute('cb-oncommand'))");
          oBtn.setAttribute("oncommand","custombuttons.codeCommand(event)");
          let num = Cb.getNumber(oBtn.getAttribute("id"));
          oBtn.label = oBtn.label || "Button" + num;
          if ( custombuttons.getPrefs(CB2const.BUTTON_TT_CB_ID ) ) {
            oBtn.tooltipText = num + ":" + oBtn.label + " ";
          }
          else {
            oBtn.tooltipText = oBtn.label + " ";;
          } // End if ( this.bToolTipId )
      /*---- hack to try to improve bug with Function.prototype disappearance ---*/
          Cb.reinitFunctionPrototypeBind();
      /*--- end hack ---*/
          this.initId = "Button " + num;
          var initFunction=new Function(oBtn.getAttribute("cb-init")); if (Cb.deBug){Components.utils.reportError(this.initId);} this.initId = "Button " + Cb.getNumber(oBtn.id) + " "+ Components.stack.lineNumber; initFunction.apply(oBtn);
          oBtn.setAttribute("initialized","true");
        } catch(e) {
          var msg= "[ "+cb2String.sOvrlyCB2Error+" ]"
            +"[ "+cb2String.sOvrlyCB2ErroEvtInit+" ]\n"
            +"[ "+cb2String.sOvrlyCB2MkBtnNam.replace(/%s/gi,oBtn.getAttribute("label"))+" ]"
            +"[ "+cb2String.sOvrlyCB2MkBtnId.replace(/%s/gi,oBtn.getAttribute("id"))+" ]"
            +"[ "+e+" ]";
          Components.utils.reportError(e);
    //      Components.utils.reportError(msg);
        }
      }; //}}} End Method initButton( oBtn )
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons2 Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20090207.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/debug-buttons-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons2 Attributes Block End -------------------*/

    Help Tab

       1. Open Console2 in the only tab.
       2. Select errors, warnings, & messages.
       3. Select Chrome
       4. Clear the list.
       5. Click the Debug button
       6. A list of errors/Warnings will be generated.
          a. 2 entries per button
          b. The second entry Id's the button. (Not always absolute due to threading.)
       7. Enter the Button Id number in the prompt presented by the edit button that will open the offendinfg button for edit.
       8. NOTE: subtract 800 from the line # in the first warning message. This yields the correct button line #.
       9. This button will force an error for each button installed.
          a. This is to Identify which button is flaging a warning.
      10. Due to CPU threading there may be a + or - 3 diff in the button ID immediatly following the Warning in the console.
    
  138. DeCompile/Compile Button

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( this.CbStr.sButtonCompatabilityAlert );
      this.disable(true);
    }
    /*----  To make compile the default state, modify this variable to false -----*/
    this.bState = true;  // false;
    /*----------------------------------- End ------------------------------------*/
    this.Cb = custombuttons;
    this.properties = {
      en_US:{
        zLast:'Last no Comma'
      }
    };
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('...')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.leftclick  = function( evt ){
      this.execute( gClipboard.read() );
    };
    this.midclick = function(evt){
      var bnum = prompt('Enter Button #');
      var bid = 'custombuttons-button' + String(bnum);
      this.oBtn = document.getElementById(bid);
      if ( this.oBtn ) {
        this.execute(this.Cb.createLinks(0, this.oBtn));
      }
    };
    this.rightclick  = function(evt){
      let oResult = {};
      if ( this.bState ) {
        oResult = this.barSelect(this.aItems);
        if ( oResult.lresult ) {
          this.bState = !this.bState;
          this.linkType = oResult.nselected.value;
        } // End if ( oResult.lresult )
      } // End if ( !this.bState )
      else {
        this.bState = !this.bState;
      }
      this.image = ( this.bState )? this.img[0] : this.img[1];
      this.setToolTip( this );
    };
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    this.img = new Array();
    this.img.push( this.image );
    this.img.push( 'data:image/gif;base64,R0lGODlhEAAQAKIAAJ+hoUNISfDv79TU1Li2sHl9f/z8/P///yH5BAAAAAAALAAAAAAQABAAAANeeLoqVcAYIhgbIdcyLDNAMIyCUWSERQRnsLphuqyjmz1sUR1rWayPoEggCA0cLwKglWk6cTkWYEolUIhEzMCgkHi5koNWvPM0nubLA1Aym2SKqfs2PRW45kEQQFokAAA7' );
    this.aItems = new Array();
    this.aItems.push( 'Copy to Clipboard' );
    this.aItems.push( 'Copy as BBCodeLink' );
    this.aItems.push( 'Copy as HyperLink' );
    this.linkType = 0;
    this.image = ( this.bState )? this.img[0] : this.img[1];
    /**  setToolTip( btn )
     Author:  George Dunham aka: SCClockDr
     Scope:  private
     Args:  btn -
     *
     Returns:  Nothing
     Called by:  1.
     Purpose:   1. Set the tooltip to reflect the correct state
     TODO:  1.
     */
    this.setToolTip = function( btn ) //{{{
    {
      let cLinkType = btn.aItems[btn.linkType].replace( 'Copy', '' );
      let tmp = ( btn.bState )? "DeCompile to Clipboard as text" : "Compile" + cLinkType;
      let x = btn.tooltipText;
      let nIndex = (/De/.test(x))? x.indexOf('De') : x.indexOf('Compile');
      btn.tooltipText = btn.tooltipText.substring( 0, nIndex ) + tmp;
    }; //}}} End Method setToolTip( btn )
    this.execute=function(uri)
    {
      let aCode = [];
      if ( this.bState ) {
        var oRet = this.Cb.oSplitButtonURI(uri);
        if (typeof oRet == CB2const.OBJECT){
          var x = '// ' + oRet.name+'\n';
          x += '// ' + CB2const.bFieldSepNew + oRet.image+'\n';
          x += '// ' + CB2const.bFieldSepNew;
          x += ( oRet.code.toLowerCase().indexOf('/*code*/') > -1 )? '' : '/*Code*/\n';
          x += oRet.code;
          x += ( oRet.code.indexOf('========') > -1 )? '' : '\n// =============================================================================\n';
          x += '// ' + CB2const.bFieldSepNew;
          x += ( oRet.initCode.toLowerCase().indexOf('/*initialization code*/') > -1 )? '' : '/*Initialization code*/\n';
          x += oRet.initCode.replace(/\/\/\.\.\./g,'');
          x += '\n// ' + CB2const.bFieldSepNew + "/* Help */\n";
          x += oRet.Help;
          gClipboard.write(unescape(x));
        } // End if (typeof oRet == CB2const.OBJECT)
      } // End if ( bState )
      else {
        let sSplit = '// ' + CB2const.bFieldSepNew;
        aCode = uri.split( sSplit );
        var oValues = {
          name:     aCode[0].replace('// ','').replace('\n','') || '',
          image:    aCode[1] || '',
          code:     aCode[2] || '',
          initCode: aCode[3] || '',
          Help:     aCode[4].replace(/\/\* Help \*\/\n/,"") || ''
        };
        let sLinkChunk = custombuttons.buildLinkChunk( oValues );
        switch ( this.linkType )
        {
        case 1:
          uri = "[cb=custombutton://";
          uri += sLinkChunk + ',';
          uri += unescape(oValues.image) + "]" + unescape(oValues.name) + "[/cb]";
          break;
        case 2:
          uri =  '<a href="custombutton://' + sLinkChunk + '" title="';
          uri += unescape(oValues.name) + '"><img alt="' + unescape(oValues.name);
          uri += '" src="' + unescape(oValues.image) + '" border="0" ';
          uri += 'style="margin: 0 6px;" />' + unescape(oValues.name) + '</a>';
          break;
        default :
          uri='custombutton://' + sLinkChunk;
          break;
        } // End switch ( this.linkType )
        gClipboard.write( uri );
      } // End else ( bState )
    }; // End function this.execute(uri)
    this.getSupportedFlavours = function () {
      var flavours = new FlavourSet();
      flavours.appendFlavour("text/unicode");
      return flavours;
    }; // End function this.getSupportedFlavours()
    this.onDragOver = function(e,f,s){}
    this.onDrop = function(event,dDat,session){
      this.execute(dDat.data.split('\n')[0]);
    }; // End function this.onDrop(event,dDat,session)
    this.barSelect = function(items){
      var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                              .getService(Components.interfaces.nsIPromptService);
      var selected = {};
      var result = prompts.select(null, "Link Type Select"
                                  , "Select the Link type you wish to produce."
                                  , items.length, items, selected);
      return {lresult : result, nselected : selected};
    }; // End function this.barSelect(items)
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author", "deepakjoshi04, SCClockDr" );
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.setAttribute("dependency","FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0.6*");
    this.setAttribute("version","8.20090213.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/button-decompile-compile-group.html');
    this.setToolTip( this );
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    **************************************************
     To use:
     Right Click Toggles between DeCompile & Compile
    Decompile:
      1. Copy link to clipboard.
      2. Left Click on this Button.
         OR
      3. Drag the link & drop it on this button
         a. For button code (Clipboard type link)
      4. Block copy the code.
      5. Drag & drop or Left Click this button.
      6. Paste the contents of the clipboard into your
         favorite editor.
    Compile:
      1. Copy the entire buffer to the clipboard
      2. Right Click this button
      3. Select the appropriate link type
      4. Click OK
      5. Now Left Click the button.
           The clipboard now contains the link
             Paste it where you wish
    
  139. del.icio.us

    Code Tab

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    this.leftclick = function(evt) {
      var aTitle = content.document.title;
      var aURL = content.location.href;
      gBrowser.loadURI("http://del.icio.us/post?url=" + escape(aURL) + "&title=" + escape(aTitle));
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); 
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','LouCypher,nicholas');
    this.setAttribute('version','20081116.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/delicious.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    

    Help Tab

  140. Delete

    Code Tab

    /*Code*/

    Initialization Tab

    this.img1 = this.image;
    this.img2 = "data:image/gif;base64,R0lGODlhFQAaANU/AKPWmSSYGHHdSaamqpycHUjPLPf49izBF+np6WpqaurrgJWVmIeHiNnZN9Xq0X72UNfX2MnKymNfIkS1Kpb0ZHFyci0wL7W7s6ioe0JCQhtqGr29fnx8fHKdbnG2aoHbT2vNN1RWVMXTxZl2YxAQEFreNJ25mmboPVaxSo6OkaysrSIjBHV1dgkrK5KPlUExJ4iemG9ocW9vb3l5auj15t/k3729vvnWwIPfYGBgX0N+O5ucn3G+TktLS4+Pj////yH5BAEAAD8ALAAAAAAVABoAAAb/wN+P5jDVEMKkcvkzAHACnifCrDoplMejhBIBOpyq0IHVCk6lSWHCYUVsNgNViAMFAgV0YV9IhDAYEiEJKkIfdwE6ASUFB44WBAoKBCEGFYUABxMgPDqNjgcaFhISLAanHCo0ExMfHwIPJ58HNzcrDZI/ETlOBx8UOhcUAnsoIyO3ChsbJFQGPAUmITE9PQAAJgswKwQEPSsVSREmAyksIRYyFSwcOSEzORkWPkk9LgsQEDU2DG0JCRVmJCCRgZ6QHikYQPghQkUNFSl2LEg3sGC9hAsZDECggsOCFCQqVDT4w57CHxoRDPDIgASLkRdPply5oOVLgiRNZtzYsaZLY5gHMaLcoZLlT5z1XMjkafSmxaBLi/p0mlNoyp42gZZcsGOn1KwZnm61IYQBURUsavaQ4acFSQY94vxAsHDlAAY52LYgcUHJAncs9EEYoKJjDwsWWAxgwlEF4scZVmR4YyBJEAA7";
    this.setAttribute("onmouseover", "this.image = this.img2");
    this.setAttribute("onmouseout", "this.image = this.img1");
    this.onLeftClick=function()
    {
    	goDoCommand('button_delete');
    }
    this.onRightClick=function()
    {
    	goDoCommand('cmd_emptyTrash');
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	if(evt.altKey) {
    				 goDoCommand('cmd_shiftDelete');
    		return;
    	}
    	switch(evt.button) 
    	{
    		case 0:
    			this.onLeftClick();
    			break;
    		case 1:
    			this.onMiddleClick();
    			break;
    		case 2:
    			this.onRightClick();
    			break;
    	}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L= Delete Button|R= Empty Trash|Alt+L= shiftDelete|Shift+L= Open Button";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/animated-delete-button-thunderbird-clrhodes.html');
    

    Help Tab

  141. Delete - Small button

    Code Tab

    /*Code*/

    Initialization Tab

    this.img1 = this.image;
    this.img2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAADC0lEQVR42mJggAJ1ddlWIyP1XiCTBYhZ2VhZdcSFhduBtBYDDvD//38GgAACMyQlhVpv31679sKF+dd4efmeqsrL3zMJCXmZcP36f2lrm9ssDKxJHBx8OYyMTG5MTIwGUEvABgAEEIOysuT0R4+2bP7//+CBgwfD/ickJP4/deLE/2WbN/8vWLj4v7mr5f/Nm/3/798f819fX+n75MlFM4F6vYGYEWQAQAAAQQC+/wT29fvg5+TURw8O5CHu7tAA/Pw6AM7R0wDh3d0ADwACACwTDQDOwtwA6PTVAJ+fhwguLjI7ISEZ00xMdWEAAACeAojp+cdfnXY+DQu27d7H8PrVLaABDAwL5s9j+PnnF8MXRkYGfxMFBm95N4bPHxkZZGQ3Mfz4sUtbVJRlMlCzAsgbAAHEwsDPyfDzK+v56cslGcwUJBh+/frK8PXrFwZtbW0GDQ0Nhls3bjCcuf+c4c07fobTp84xHDnyj2H27FNfgXqXgQwACCBGaID6VlQ1btLW1Hv548fb+48ePbZ4+fI5Ax8fH9CnjAxfv3xl+Pv3HwMrKyPD0aNnGV68ePboxYsn8qAwAAggFniU/PkBVPtD3NnZ6dCNG7d0//z5y/3hwweGe/fuMHBzcTOcPXsW6CItoBc+MbCxMcGjEiCA4Kx///8xAKOI4cKFC+fOnDnzmZOTk4GTk4OBmZmZgYODk+Hu3TtANlr8AwFAACGMYmAEuoARGAa/wJr+/fsHxCCF/8FsRkbsiQkggJjQBRhxqcQBAAIIyYD/YKeRqJ8BIIDgBjAxsYC9wcTEDDYI5E10w0Ae4gfGDLIrAQIIbgAvLw+DmZkpw8+fPx8Bw+AxGxsLMFH9AYcDOzs7g4KCIgNIMZ+CAsOLz5/hBgAEECwaT69YsfQiDw+X4OLFiy5PmjTpr5ycHMOHD58YFBVVGD5//sTAz8/H8PDhQ4bTJ09++vX+/VyYAQABxIgafozBQEoxJCSkipWV5c/Hj18YWFiYGd68ec1+587tYy9fvtwHVLMG6MV7sOgECDAA1dIrLpUswlsAAAAASUVORK5CYII=";
    this.setAttribute("onmouseover", "this.image = this.img2");
    this.setAttribute("onmouseout", "this.image = this.img1");
    this.onLeftClick=function()
    {
    	goDoCommand('button_delete');
    }
    this.onRightClick=function()
    {
    	goDoCommand('cmd_emptyTrash');
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	if(evt.altKey) {
    				 goDoCommand('cmd_compactFolder');
    		return;
    	}
    	switch(evt.button) 
    	{
    		case 0:
    			this.onLeftClick();
    			break;
    		case 1:
    			this.onMiddleClick();
    			break;
    		case 2:
    			this.onRightClick();
    			break;
    	}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L= Delete Button|R= Empty Trash|Alt+L= Compact Folder|Shift+L= Open Button";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/animated-delete-button-thunderbird-clrhodes.html');
    

    Help Tab

  142. Delete All

    Code Tab

    /*Code*/

    Initialization Tab

    this.onLeftClick=function()
    {
    	goDoCommand('cmd_selectAll');
    	goDoCommand('cmd_delete');
    }
    this.onMiddleClick=function()
    {
    	this.showPopup(this);
    }
    this.onRightClick=function()
    {
    	this.showPopup(this);
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	switch(evt.button) 
    	{
    		case 0:
    			this.onLeftClick();
    			break;
    		case 1:
    			this.onMiddleClick();
    			break;
    		case 2:
    			this.onRightClick();
    			break;
    	}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L-Delete All | M-Popup | R-Popup";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/delete-all-mails-folder-tb.html');

    Help Tab

  143. Delete Junk/Compact Folders

    Code Tab

    /*Code*/
    // =============================================================================
    /* 
         L-click:  Delete Junk
         Middle-click:  Compact Folders
         Right-click:  Empty Trash
         Shift-click:  CustomButtons context menu
    */
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	goDoCommand('cmd_deleteJunk');
    }
    this.midclick    = function(evt){
    	goDoCommand('cmd_compactFolder');
    }
    this.rightclick  = function(evt){
            gFolderTreeController.emptyJunk();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','201024.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/delete-junk-compact-folders.html');
    this.setAttribute('dependency','TB3');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText = '   L:  Delete Junk \n   R:  Compact Foldres  \n   R:  Empty Junk Folder ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    Help:
         L-click:  Delete Junk
         Middle-click:  Compact Folders
         Right-click:  Empty Trash
         Shift-click:  CustomButtons context menu
    
  144. Delete/Mark as Junk/Delete Junk

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	goDoCommand('cmd_delete');
    }
    this.midclick    = function(evt){
    	goDoCommand('button_junk');
    }
    this.rightclick  = function(evt){
    	goDoCommand('cmd_deleteJunk');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20090101');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/delete-mark-junk-button-tbird.html');
    this.setAttribute('dependency','TB3.0.*,  TB2.0*, CB2 2.0.9.51*');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    //this.tooltipText = ' L: Delete  M: MarkJunk  R: DeleteJunk ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    /*------------------------- Tooltip Block Start ------------------------------*/
    // ver 20090101.0200
    var sp = " ";  // hard space
    let cr = " ";  // hard space
       cr = (custombuttons.compareVersion( custombuttons.gAppVersion(), "3*" ) >= 0)? "\n " : cr ;   
    // Delete any unused lines.
    var ttip = " L:   Delete "
        +cr+sp+" M:   Mark as Junk "
        +cr+sp+" R:   Delete Junk ";
    this.tooltipText += sp+cr+sp+ttip+sp+sp;
    /*--------------------------- Tooltip Block End ------------------------------*/
    

    Help Tab

    Help%3A%0A%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20Left%3A%20%20%20%20Delete%0A%20%20%20%20%20%20%20Middle%3A%20%20Mark%20as%20Junk%0A%20%20%20%20%20%20%20Right%3A%20%20%20Delete%20Junk%0A%0A%20%20%20%20%20Shift%20+%20R%3A%20%20Context%20Menu%0A%0A%0A%0A
  145. determine oldest window demo

    Code Tab

    /* 
    This is based around some code from Mozilla's developer centre: 
      http://developer.mozilla.org/en/nsIWindowMediator#Enumerating_windows
    I've tried to explain it to the best of my understanding
    */
    function GetOldestWindow()
    {
            // Basically sets wm to a list of the open windows
    	var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
    			   .getService(Components.interfaces.nsIWindowMediator);
            // This can be used to enumerate through windows of different types: wm.getEnumerator(<type>)
            // For example, "" means all and "navigator:browser" means browser windows, as I understand it.
    	var enumerator = wm.getEnumerator("navigator:browser");
           	// Get the first window in the list
    	var win = enumerator.getNext();
            // Sets the function to return this first window when it is called
    	return win;
    }
    // Show a message displaying whether the current window is the oldest or not
    if (GetOldestWindow() == window) {
      MyObj = createMsg(['title']);
      MyObj.aMsg('This window is the oldest');
    }
    else {
      MyObj = createMsg(['title']);
      MyObj.aMsg('This window is not the oldest');
    }

    Initialization Tab

    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-rawny.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, FL1.0*, TB2.0*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  146. Dictionary

    Code Tab

    //Just highlight a word and then click on this button for a dictionary definition.
    var addybit="http://www.dictionary.com/";
    var querybit="search\?q\=";
    var lastbit="\&db\=\*";
    //MANY thanks to Zoolcar9 for this bit ;-)
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
    var str = winWrapper.getSelection().toString();
    str = escape(str);
    var build=addybit+ querybit + str + lastbit;
    const url = build;
    window.open(url); 
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/dictionary-highlighted-text-button.html');

    Help Tab

  147. Dictionary

    Code Tab

    //Just highlight a word and then click on this button for a dictionary definition.
    var addybit="http://www.dictionary.com/";
    var querybit="search\?q\=";
    var lastbit="\&db\=\*";
    //MANY thanks to Zoolcar9 for this bit ;-)
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
    var str = winWrapper.getSelection().toString();
    str = escape(str);
    var build=addybit+ querybit + str + lastbit;
    const url = build;
    window.open(url); 
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/dictionary-highlighted-text-button.html');

    Help Tab

  148. Digi-Key Fast Add

    Code Tab

    if(event.shiftKey){
    	gBrowser.selectedTab=gBrowser.addTab(this.link);
    	return;	
    }
    var num=1; 
    while(this.info.length>0){
    	var obj = gBrowser.contentDocument.getElementsByName("qty"+num);
    	if(obj.length!=1){alert("Error!");return;}
    	var words=this.info.shift().split(/\s/);
    	for(var i=0;i<words.length;i++){
    		words[i]=words[i].replace(/g\s/,"");
    		if(words[i].length==0){
    			words.splice(i,1);
    			i--;
    		}
    	}
    	if(words.length==0 || words[0].match(/\D/))continue;
    	obj[0].value=words[0];
    	var obj = gBrowser.contentDocument.getElementsByName("part"+num);
    	if(obj.length!=1){alert("Error!");return;}
    	obj[0].value=words[1];
    	if(num==20)return;
    	num++;
    }
    //remove all other extra text
    while(num<=20){
    	var obj = gBrowser.contentDocument.getElementsByName("qty"+num);
    	if(obj.length!=1){alert("Error!");return;}
    	obj[0].value="";
    	var obj = gBrowser.contentDocument.getElementsByName("part"+num);
    	if(obj.length!=1){alert("Error!");return;}
    	obj[0].value="";
    	num++;
    }

    Initialization Tab

    this.link="http://www.digikey.com/";
    this.info = new Array();
    //this stuff is for drag and drop handaling 
    this.getSupportedFlavours = function () {
      var flavours = new FlavourSet();
      flavours.appendFlavour("text/unicode");
      return flavours;
    };
    this.onDragOver = function(e,f,s){};
    this.onDrop = function(event,dDat,session){
      if(event.shiftKey){
        this.info=dDat.data.split(/^\s*\d*/m);
      }else{
        this.info=dDat.data.split(/^/m);
      }
    };
    this.onDragStart=function(event,transferData,action){
    	transferData.data=new TransferData();
    	transferData.data.addDataForFlavour("text/unicode",this.link);
    };
    //set our drag event handlers
    //nsDragAndDrop is some sort of wrapper provided by FF so that drag and drop stuff is easier
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    this.setAttribute("ondraggesture","nsDragAndDrop.startDrag(event,this);");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/digi-key-fast-add-button-jessef.html');

    Help Tab

  149. DOM Inspector

    Code Tab

    inspectDOMDocument(content.document);

    Initialization Tab

    if(typeof inspectDOMDocument != "function") {
      var ext = "DOM Inspector";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.onClick = function(evt) {
      if(evt.button==1) {
        inspectDOMDocument(document); //inspect chrome document (browser)
      }
    }
    this.setAttribute("onclick", "this.onClick(event)");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/dom-inspector-button.html');
    

    Help Tab

  150. DOMi and Error Console

    Code Tab

    /*Code*/ 
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    this.leftclick   = function(evt){
    	inspectDOMDocument(content.document);
    }
    this.sleftclick  = function(evt){
    	gShowPopup(this);
    }
    this.midclick    = function(evt){
    	inspectDOMDocument(document);
    }
    this.smidclick   = function(evt){
    	gShowPopup(this);
    }
    this.rightclick  = function(evt){
    	toJavaScriptConsole();
    }
    this.arightclick = function(evt){
    	gBrowser.addTab('chrome://global/content/console.xul');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*----------------- uncomment to show mouseover effects ---------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20070926.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/domi-error-console.html');
    this.setAttribute('dependency','');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText += '\n Left:\tDOMi content \n Middle:\tDOMi FF \n Right:\tEC float \n Alt + R:\tEC tab ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    /*Help*/%0A%0A%0A%20%20%20%20%20Left%3A%20%20%09DOMi%20Inspect%20Content%0A%20%20%20%20%20Middle%3A%20%09DOMi%20Inspect%20Browser%0A%20%20%20%20%20Right%3A%20%20%09Error%20Console%20%28float%29%20%20%20%20%20%0A%20%20%20%20%20Alt%20+%20R%3A%20%20%09Error%20Console%20%28tab%29%0A%20%20%20%20%20Shift%20+%20R%3A%09Context%20Menu%0A%0ADiscussion%20%26%20Support%09http%3A//custombuttons2.com/forum/viewtopic.php%3Ff%3D36%26t%3D294%0A%20%20%20
  151. Download Manager

    Code Tab

    /*CODE*/
    document.getElementById("menu_openDownloads").click();

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20090607.00');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/download-manager.html');

    Help Tab

  152. DownThemAll!

    Code Tab

    /*Code*/
    //===============================================

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	DTA_ContextOverlay.findLinks(true);
    }
    this.midclick    = function(evt){
    	DTA_AddingFunctions.openManager();
    }
    this.rightclick  = function(evt){
    	DTA_ContextOverlay.findLinks(false);
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*---------------- un-comment to show mouseover effects ---------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25, deepakjoshi04, m435tr0d, others');
    this.setAttribute('version','20060920.08');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/downthemall.html');
    this.setAttribute('dependency','DownThemAll!');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText += '\n L:\tOne-Click \n M:\tManager \n R:\tSelect ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    /*Help*/%0A%0A%20Replaces%20the%20three%20buttons%20for%20the%20%22DownThemAll%21%22%20extension%20%28required%29%20%0A%20https%3A//addons.mozilla.org/en-US/firefox/addon/201%0A%0A%09Left%3A%09dTa%21OneClick%20%0A%09Middle%3A%09dTa%21%20Manager%20%0A%09Right%3A%09dTa%21%20Select%20%0A%0A%09Shift%20+%20R%3A%20Context%20Menu%20%0A%0ADiscussion%20%26%20Support%09http%3A//custombuttons2.com/forum/viewtopic.php%3Ff%3D36%26t%3D361
  153. Drag Drop Demo

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    // determine what kind of data to get out of the dragged item
    this.getSupportedFlavours = function () {
    var flavours = new FlavourSet();
      // flavours are "text/unicode" | "text/html" | "application/x-moz-url" | application/x-moz-file
      flavours.appendFlavour("text/html");
      return flavours;
    }
    this.onDragOver = function(e,f,s){} //allow us to drag over
    // handle the drop and run some kind of function
    this.onDrop = function(event,dDat,session){
      var data=dDat.data; // dDat.data is what is returned from the drop
      if (event.shiftKey) custombuttons.alertSlide(this.label, data); // event.x can be used to find shift ctrl etc.
      else alert(data); // normal drop
    }
    // set our drag/drop handlers
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    // button attributes
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);");
    this.setAttribute('author','nicholas, jessef');
    this.setAttribute('version','20081122.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    

    Help Tab

  154. Drag n Drop to and from Clipboard

    Code Tab

    /*Code*/
    /*
    	Drag & Drop to & from Clipboard		Sun Feb 11 2007 9:56:09 PM GMT-0800 (Pacific Standard Time)
    	cblover @ http://custombuttons.phpbbnow.com/viewtopic.php
    	CB Regular
    	Joined: 26 Oct 2006
    	Location: Spokane County, Washington, USA
    	Description
    		Select some text and drop it on the button and the selection will be on the clipboard
    		Drag & drop the button on an input and clipboard is pasted
    		Left click for an alert of what is on the clipboard
    		Shift click or Right click for CB context menu
    	Acknowledgements (Custom Buttons Forum Members)
    		SCClockDr for the Write to Clipbard Routine and the code for the click stuff
    		Jessef for the basic drag and drop procedures
    			see http://custombuttons.phpbbnow.com/viewtopic.php?t=442#2250
    */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    // Begin Click Routine
    this.quot = function(evt)
    	{
    	if(evt.shiftKey  || evt.ctrlKey || evt.altKey || evt.metaKey){this.showPopup(this); return;}
    	switch(evt.button)
    	{
    	case 0: // Left Click
    // --------------------------------------- Left Click Code and Function calls go here
    		alert(readFromClipboard());
    		//this.showPopup(this);	// Delete this line if a function call is included in this case
    					// Local function calls only to the Init side.
    		break;
    	case 1:	// Middle Click
    // --------------------------------------- Middle Click Code and Function calls go here
    		this.showPopup(this);	// Delete this line if a function call is included in this case
    					// Local function calls only to the Init side.
    		break;
    	case 2:	// Right Click
    // --------------------------------------- Right Click Code and Function calls go here
    		this.showPopup(this);	// Delete this line if a function call is included in this case
    					// Local function calls only to the Init side.
    		break;
    	}
    	}
    this.showPopup = function(node)
    	{
    	var popup = document.getElementById("custombuttons-contextpopup");
    	var x = node.boxObject.x;
    	var y = node.boxObject.y + node.boxObject.height;
    	document.popupNode = node;
    	popup.showPopup(node, x, y, "popup", null, null);
    	}
    // End Click Routine
    if (!custombuttons.writeToClipboard)
    	{
    	custombuttons.writeToClipboard = function(str)
    		{
    		if (str != null && str.length > 0)
    			{  // open if
    			const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
    			gClipboardHelper.copyString(str);
    			}
    		}
    	}
    function readFromClipboard()
    {
    var clip = Components.classes["@mozilla.org/widget/clipboard;1"]. getService(Components.interfaces.nsIClipboard); if (!clip) return false; var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable); 
    if (!trans) return false; 
    trans.addDataFlavor("text/unicode");
    clip.getData(trans,clip.kGlobalClipboard);
    var str = new Object();
    var strLength = new Object(); 
    trans.getTransferData("text/unicode",str,strLength);
    if (str) str = str.value.QueryInterface(Components.interfaces.nsISupportsString);
    if (str) pastetext = str.data.substring(0,strLength.value / 2);
    return pastetext;
    }
    this.getSupportedFlavours = function () 
    	{
    	var flavours = new FlavourSet();
    	flavours.appendFlavour("text/unicode");
    	return flavours;
    	}
    this.onDragOver = function(e,f,s){}
    this.onDrop = function(event,dDat,session)
    	{
    	custombuttons.writeToClipboard(dDat.data);	
    	}
    this.onDragStart = function (event, transferData, action)
    	{
    	transferData.data = new TransferData();
    	transferData.data.addDataForFlavour("text/unicode",readFromClipboard());
    	}
    this.setAttribute("ondraggesture","nsDragAndDrop.startDrag(event,this);");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    this.setAttribute("onclick", "this.quot(event);");	// Part of Click Stuff
    this.tooltipText = this.label + "";
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','Jessef, cblover');
    this.setAttribute('version','20070211.3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/drag-drop-clipboard.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    null
  155. Drag to Split Browser...

    Code Tab

    /* Drag to Split Browser - requires Split Browser extension                              */
    /* - change staticURL to always open that url, or leave empty to split/copy current page */

    Initialization Tab

    var staticURL = "";
    // staticURL = "about:blank";
    this.onDragStart = function (event, transferData, action) {
      var url
      if (!staticURL) {
        var win = document.commandDispatcher.focusedWindow;
        if (win.document == "[object XULDocument]")
          url = content.location.href;
        else
          url = win.top.location.href;
      }
      else
        url = staticURL;
      transferData.data = new TransferData();
      transferData.data.addDataForFlavour("application/x-moz-splitbrowser", url); 
    }
    this.setAttribute("ondraggesture","nsDragAndDrop.startDrag(event, this);");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, contentAreaDNDObserver);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, contentAreaDNDObserver);");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/drag-split-browser.html');

    Help Tab

  156. Drupal Smileys

    Code Tab

    /*Code*/
    

    Initialization Tab

    var Cb=custombuttons;
    var num=Cb.getNumber(this.id);
    var prefstring = "custombuttons.forumEmoticons-"+num+".menu";
    var poststr="",btnlbl,favicon,cbTitl,cbCode,cbImg,cbCodes=[],cbImgs=[],cbTitls=[],root=Cb.getPrefs(prefstring+"-siteroot"),mPop,popupID="cbMenucbForumEmoticons"+num,that=this;
    var form_url=root+"/filter/tips";
    var cbTtl = "Drupal Smileys";
    var cbDef = "Drupal Smileys";
    var cbLbl = "Please select the smileys that you would like to have in your menu";
    var cbAcc = "Accept";
    var cbCnl = "Don't Accept";
    var cbPmp = "Please set the root of the drupal site you will be using this for\nExample: \"http://custombuttons2.com\" (no trailing slash please):";
    var cbPdf = "http://";
    var cbAlr = "You must set a Drupal root site\nin order to use this button";
    var cbPst = "Your Drupal root site has been set";
    var cbPnt = "Your Drupal root site was NOT reset";
    this.html_entity_decode = function(str) {
      var tarea=content.document.createElement('textarea');
      tarea.innerHTML = str; return tarea.value;
      tarea.parentNode.removeChild(tarea);
    }
    var http_request = false;
    this.makePOSTRequest = function(url, parameters, mode) {
      http_request = false;
      if (window.XMLHttpRequest) {
        http_request = new XMLHttpRequest();
        if (http_request.overrideMimeType) {
          http_request.overrideMimeType('text/html');
        }
      }
      if (!http_request) {
        alert('Cannot create XMLHTTP instance');
        return false;
      }
      http_request.onreadystatechange = this.alertContents1;
      http_request.open('POST', form_url, true);
      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http_request.setRequestHeader("Content-length", parameters.length);
      http_request.setRequestHeader("Connection", "close");
      http_request.send(parameters);
    }
    this.alertContents1 = function() {
      if (http_request.readyState == 4) {
        if (http_request.status == 200) {
          regIc = /(.*?)\<link\srel\=\"shortcut\sicon\"\shref\=\"(.*?)\"\stype\=\"image\/x\-icon\"\s\/\>(.*)/i;
          regHd = /\<\!DOCTYPE(.*?)\<li\sid\=\"filter\-smileys\-0\"\>(.*?)\<tbody\>/i;
          regEx = /\<tr\sclass\=\"(.*?)\"\>\<td\>\<img\ssrc\=\"(.*?)\"\salt\=\"(.*?)\"\stitle\=\"(.*?)\"\sclass\=\"smiley\-class\"\s\/\>\<\/td\>\<td\>(.*?)\<\/td\>\s\<\/tr\>/ig;
          regFt = /\<\/tbody\>\n\<\/table\>\<\/fieldset\>(.*)/i;
          regTl = /(.*?)\<title\>(.*?)\|\s(.*?)\<\/title\>(.*)/i;
          result = http_request.responseText;
          result = result.replace(/([\s]+)/g, " ");
          btnico = result.replace(regIc, "$2");
          btnlbl = result.replace(regTl, "$3 Smileys");
          result = result.replace(regHd, "");
          result = result.replace(regFt, "");
          root=Cb.getPrefs(prefstring+"-siteroot");
          favicon = root+btnico;
          cbTtl = (Cb.isPref(prefstring+"-btnlbl")) ? that.html_entity_decode(Cb.getPrefs(prefstring+"-btnlbl")) : cbTtl;
          cbTitl = result.replace(regEx, "$4¥");
          cbTitls = cbTitl.split("¥");
          cbCode = result.replace(regEx, "$3¥");
          cbCodes = cbCode.split("¥");
          cbImg = result.replace(regEx, "$2¥");
          cbImgs = cbImg.split("¥");
          var cbArr=[],cbTitln="",cbCoden="",cbImgn="";
          for(i=0;i<cbCodes.length;i++) {
            if(i!=(cbCodes.length-1)) cbArr.push([cbTitls[i],true,cbCodes[i],cbImgs[i]]);
          }
          var cbCheck = custombuttons.checkboxDialog(that,cbArr,cbTtl,cbLbl,null,null,cbAcc,cbCnl,null,null,null,null);
          if (cbCheck) {
            for(i = 0; i < cbArr.length; i++) {
              if(cbArr[i][1] == true) {
                cbTitln += cbArr[i][0]+"¥";
                cbCoden += cbArr[i][2]+"¥";
                cbImgn += cbArr[i][3]+"¥";
              }
            }
            Cb.setPrefs(prefstring+"-btnlbl", btnlbl);
            Cb.setPrefs(prefstring+"-favicon", favicon);
            Cb.setPrefs(prefstring+"-cbTitl", cbTitln);
            Cb.setPrefs(prefstring+"-cbCode", cbCoden);
            Cb.setPrefs(prefstring+"-cbImg", cbImgn);
            var ximg = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-icon");
            ximg.setAttribute("style", 'background-image:url("'+favicon+'")!important;');
            that.init();
            Cb.alertSlide(that.label,"Smileys Reconfigured");
          }
          else { 
            Cb.alertSlide(that.label,"Smileys NOT Reconfigured");
          }
        } else {
          alert('There was a problem with the request.');
        }
      }
    }
    this.get = function(obj) {
      root=Cb.getPrefs(prefstring+"-siteroot");
      form_url=root+"/filter/tips";
      poststr = "";
      this.makePOSTRequest(form_url, poststr,1);
    }
    this.setRoot = function(mode) {
      var cbSetRoot = Cb.promptBox(cbDef, cbPmp, cbPdf);
      if ((cbSetRoot[0] == false) && (!Cb.isPref(prefstring+"-siteroot"))) {
        Cb.alertBox(this.label, cbAlr);
      }
      else if (cbSetRoot[0] == false) {
        Cb.alertSlide(this.label,cbPnt);
      }
      else {
        Cb.setPrefs(prefstring+"-siteroot", cbSetRoot[1]);
        Cb.alertSlide(cbDef,cbPst);
        if (mode == 'reset') this.get();
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById(popupID);
      document.popupNode = node;
      popup.openPopup(node, "after_start", null, null, "popup", null, null);
    }
    this.leftclick   = function(evt){
      if (!Cb.isPref(prefstring+"-siteroot")) this.setRoot();
      if (!Cb.isPref(prefstring+"-siteroot")) return;
      if (!Cb.isPref(prefstring+"-cbTitl")) this.get();
      if (evt.originalTarget.id == this.id) this.showPopup(this);
    };
    this.midclick    = function(evt){
      this.get();
    }; this.cleftclick = function(evt) { this.midclick(evt); }
    nItem=function(label,value,img){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      if(value.match("this.parent")) mItem.tooltipText = label;
      else mItem.tooltipText = value;
      mItem.value = value;
      mItem.setAttribute('class','menuitem-iconic');
      mItem.setAttribute('image',img);
      mItem.setAttribute('name',name);
      if(value.match("this.parent")) mItem.setAttribute('oncommand',value);
      else mItem.setAttribute('oncommand',"this.parentNode.parentNode.pasteItem(' "+value+" ');");
      return mItem;
    }
    this.init = function() {
      var ximg = document.getAnonymousElementByAttribute(this, "class", "toolbarbutton-icon");
      var img = (Cb.isPref(prefstring+"-favicon")) ? Cb.getPrefs(prefstring+"-favicon") : "";
      ximg.setAttribute("style", 'background-image:url("'+img+'")!important;');
      var bLabl = (Cb.isPref(prefstring+"-btnlbl")) ? Cb.getPrefs(prefstring+"-btnlbl") : "";
      var mTitl = (Cb.isPref(prefstring+"-cbTitl")) ? Cb.getPrefs(prefstring+"-cbTitl") : "";
      var mCode = (Cb.isPref(prefstring+"-cbCode")) ? Cb.getPrefs(prefstring+"-cbCode") : "";
      var mImg = (Cb.isPref(prefstring+"-cbImg")) ? Cb.getPrefs(prefstring+"-cbImg") : "";
      var mTitls = mTitl.split("¥");
      var mCodes = mCode.split("¥");
      var mImgs = mImg.split("¥");
      var meNu = new Array();
      for(i=0;i<mCodes.length;i++) {
        if(i!=(mCodes.length-1)) meNu.push([mTitls[i],mCodes[i],mImgs[i]]);
      }
      meNu.push(['separator']);
      meNu.push(['Change button\'s smileys','this.parentNode.parentNode.setRoot("reset");',img]);
      meNu.push(['Reconfigure Smileys','this.parentNode.parentNode.get();',img]);
      if (document.getElementById(popupID)) this.removeChild(this.firstChild);
      mPop=document.createElement('menupopup');
      mPop.setAttribute("id", popupID);
      if (Cb.getPrefs(prefstring+"-cbTitl") != "" && Cb.getPrefs(prefstring+"-cbTitl") != null) {	
        for (var i=0;i<meNu.length;i++){
          if (meNu[i] =='separator') {
            mPop.appendChild(document.createElement('menuseparator'));
          }
          else {
            mPop.appendChild(nItem(meNu[i][0],meNu[i][1],meNu[i][2]));
          }
        }
        this.appendChild(mPop);
      }
      this.label = (bLabl == "") ? "Drupal Smileys" : this.html_entity_decode(bLabl);
      this.tooltipText = this.label + '\n' +
                        'Click an item to paste at cursor position\n' +
                        'M or Ctrl+L: Reconfigure Button';
      var ximg = document.getAnonymousElementByAttribute(this, "class", "toolbarbutton-icon");
      ximg.setAttribute("style", 'background-image:url("'+img+'")!important;');
    }
    this.init();
    this.pasteItem= function(value) {
      var theBox = document.commandDispatcher.focusedElement;
      var startPos = theBox.selectionStart;
      var endPos = theBox.selectionEnd;
      var oPosition = theBox.scrollTop;
      var oHeight = theBox.scrollHeight;
      var text=theBox.value.substring(0,startPos);
      var nHeight = theBox.scrollHeight - oHeight;
      var str = value;
      text +=str;
      text +=theBox.value.substring(endPos, theBox.value.length);
      theBox.value = text;
      theBox.selectionStart = startPos + str.length;
      theBox.selectionEnd = startPos + str.length;
      theBox.scrollTop = oPosition + nHeight;
    }
    this.value=-1;
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20090220.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/drupal-smileys.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.7.96*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

  157. Drupal Theme Switcher

    Code Tab

    /*Code*/

    Initialization Tab

    // setup some default variables
    var cb=custombuttons, poststr="", http_request=false, self=this, num=cb.getNumber(this.id), popupID="drupalthemes"+num, pref="drupaltheme."+num+".themes", imgPref="drupaltheme."+num+".theme-images", defThemePref="drupaltheme."+num+".defaultTheme", cmd = "";
    // initialize vars
    var domain = "custombuttons2.com"; // insert domain name here
    var userid = "0"; // your user id number goes here
    // construct form url from previous vars
    var form_url = "http://"+domain+"/?q=user/"+userid+"/edit";
    // translation strings
    function l(str) {
      self.properties = {
        en_US:{             // English US translation by nicholas
          Label:              "Drupal Theme Switcher",
          Refresh:            "Refresh Theme's List",
          NOT:                "Your theme has NOT been switched, you may not be logged in!",
          HAS:                "Your theme has been switched! Now refreshing page...",
          Error:              "The theme may not have been submitted, there was an error",
          AddedMenu:          "The themes have been added to the menu",
          NotGetList:         "Could NOT get list of themes, you may not be logged in!",
          ChooseTheme:        "Choose a theme from the menu",
          Help:               "Left:"+"\n"+
                              "    Open the menu of themes."+"\n"+
                              "Left (on menu item):"+"\n"+
                              "    Changes to the chosen theme for the site"+"\n"+
                              "Hover over menu item:"+"\n"+
                              "    See theme's thumbnail"+"\n"+
                              "Right:"+"\n"+
                              "    Custom Buttons² Context Menu"
        },
        fr:{                // Traduction française fr par goofy@babelzilla.org
          Label:              "Changement de thème pour Drupal",
          Refresh:            "Réactualiser la liste des thèmes",
          NOT:                "Votre thème n'a PAS été modifié, il se peut que vous ne soyez pas identifié(e) !",
          HAS:                "Votre thème a été modifié ! Page en cours d'actualisation...",
          Error:              "Il se peut que le thème n'ait pas été proposé, une erreur s'est produite",
          AddedMenu:          "Les thèmes ont été ajoutés au menu",
          NotGetList:         "Impossible de consulter la liste des thèmes, vous n'êtes peut-être pas identifié(e) !",
          ChooseTheme:        "Choisir un thème dans le menu"
        },
        nl:{                // Nederlandse vertaling door markh
          Label:              'Thema wisselen voor Drupal',
          Refresh:            "Themalijst verversen",
          NOT:                'Uw thema is NIET gewisseld, u bent mogelijk niet ingelogd!',
          HAS:                'Uw thema is gewisseld! Pagina wordt ververst…',
          Error:              'Het thema is mogelijk niet ingediend, er is een fout opgetreden',
          AddedMenu:          'De thema’s zijn toegevoegd aan het menu',
          NotGetList:         'Kan themalijst NIET ophalen, u bent mogelijk niet ingelogd!',
          ChooseTheme:        'Kies een thema uit het menu'
        }
      };
      var tstr = cb.getLocalString(self, str);
      return tstr;
    }
    var refresh = l("Refresh"); // label for the refresh themes menu item
    // AJAX posting function
    function makePOSTRequest(url, parameters, mode) { //mode 1=fetch page first
      http_request = false;
      if (window.XMLHttpRequest) {
        http_request = new XMLHttpRequest();
        if (http_request.overrideMimeType) {
          switch(mode) {
            case 1: http_request.overrideMimeType('text/html'); // this returns a string of html
            case 2: http_request.overrideMimeType('text/xml'); // if we get xml then we retrieve an object!
            case 3: http_request.overrideMimeType('text/xml'); // objects can be parsed like the dom!!!
            default: break; 
          }
        }
      }
      if (!http_request) {
        alert('Cannot create XMLHTTP instance');
        return false;
      }
      switch(mode) {
        case 1: http_request.onreadystatechange = alertContents1;break;
        case 2: http_request.onreadystatechange = alertContents2;break; 
        case 3: http_request.onreadystatechange = alertContents3;break; 
        default: break; 
      }
      http_request.open('POST', form_url, true); // define the type of posting page POST/GET
      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http_request.setRequestHeader("Content-length", parameters.length);
      http_request.setRequestHeader("Connection", "close");
      http_request.send(parameters);
    }
    function constructString(obj) { // this constructs our poststr from the object
      poststr="";
      var i=1,name="";
      for(j in obj) {
        if(j != "null") {
          name = j;
          name = name.replace(/(.*?)123456789(.*?)/g,"$1[$2"); // put back "["
          name = name.replace(/(.*?)987654321(.*?)/g,"$1]$2"); // put back "]"
          val = encodeURIComponent(obj[j]); // encode characters that won't submit well
          poststr += (i == 1) ? name+"="+val : "&"+name+"="+val; // make our string
          i++;
        }
      }
      return poststr;
    }
    // this gets the data from our form for posting to the form
    function alertContents1() {
      if (http_request.readyState == 4) {
        if (http_request.status == 200) {
          result = http_request.responseXML; // an object from the page we queried
          var form = result.getElementById("user-profile-form"); // our form
          var inputs = form.getElementsByTagName("input"); // get all inputs
          var tareas = form.getElementsByTagName("textarea"); // get all textareas
          var formdata = {}, inputname = "", tareaname = "";
          for(var i = 0; i < inputs.length; i++) { // handle all input fields
            if( // remove some fields that cause the form to error
            (inputs[i].type != "password")&&
            (inputs[i].name != "files[picture_upload]")&&
            (inputs[i].name != "roles[2]")&&
            (inputs[i].name != "picture_delete")) {
              inputname = inputs[i].name;
              inputname = inputname.replace(/\[/g,"123456789"); // replace the [ and ] 'cause these don't play nicely with objects.
              inputname = inputname.replace(/\]/g,"987654321"); // ...we put these back later
              // next line handles checkboxes, checking whether they have a check or no check then sets them correspondingly
              if(inputs[i].type == "checkbox") inputvalue = (inputs[i].hasAttribute("checked") == false) ? "0" : "1";
              else if(inputs[i].type == "radio") { // need to handle radios a bit differently to detect one radio with checked attribute
                if(inputs[i].hasAttribute("checked") == true) inputvalue = (inputs[i].value) ? inputs[i].value : "";
                else inputname = null; // if it has no checked attribute, make it's name "null"
              }
              else inputvalue = inputs[i].value; // else use the regular value
              formdata[inputname] = inputvalue; // establish the property and attribute of the object
            }
          }
          for(var i = 0; i < tareas.length; i++) { // handle our textarea fields
            tareaname = tareas[i].name; // use the regular name
            tareavalue = tareas[i].value; // use the regular value
            formdata[tareaname] = tareavalue; // establish the property and attribute of the object
          }
          formdata.theme = self.theme; // get the theme value that gets sent upon clicking a menuitem
          formdata.op = 'Save'; // set the form to Save, otherwise it might click delete :oops:
          poststr = constructString(formdata); // run the object through a function to construct our query string
          makePOSTRequest(form_url, poststr,2); // send the string to the form
        } 
        else {
          cb.alertSlide(self.label, l("NOT")); 
        }
      }
    }
    // this is what to do after the form has been submitted
    function alertContents2() {
      if (http_request.readyState == 4) {
        if (http_request.status == 200) {
          result = http_request.responseText; // this means we successfully heard from the form
          BrowserReloadSkipCache(); // reload the browser bypassing cache to make sure the stylesheets are fresh
          cb.alertSlide(self.label, l("HAS")); 
        } 
        else {
          cb.alertSlide(self.label, l("Error")); 
        }
      }
    }
    // used to show the popup of themes
    this.showPopup = function(node) {
      var popup = document.getElementById(popupID);
      document.popupNode = node;
      popup.openPopup(node, "after_start", null, null, "popup", null, null);
    }
    // add our menu to this node
    this.setMenu = function(meNu,imGs) { 
      if (document.getElementById(popupID)) this.removeChild(this.firstChild);
      mPop=document.createElement('menupopup');
      mPop.setAttribute("id", popupID);
      if (imGs) imGs.push("null");
      if (imGs) imGs.push("null");
      meNu.push("separator"); // add separator
      meNu.push(refresh); // add a refresh menuitem for refreshing the list of themes
      for (var i=0;i<meNu.length;i++){ // run through the array of theme names that we use for menuitems
        if (meNu[i] =='separator') mPop.appendChild(document.createElement('menuseparator'));
        else if (imGs && (imGs[i] != 'null')) mPop.appendChild(nItem(meNu[i], imGs[i]));
        else mPop.appendChild(nItem(meNu[i]));
      }
      this.appendChild(mPop); // append the menu
    }
    // construct each menuitem thrown at us
    nItem=function(name, image){
      var mItem=document.createElement('menuitem');
      var namespace = (name == "") ? cb.getPref(defThemePref) : name;
      mItem.setAttribute('label',namespace);
      mItem.value = name;
      mItem.setAttribute('name',name);
      cmd = (name != refresh) ? name : "refresh123"; // if the menuitem is for refresh don't use the name for the command
      mItem.setAttribute('oncommand',"this.parentNode.parentNode.setTheme('"+cmd+"');");
      // do our neato tooltip text that contains the thumbnail of the theme
      if(image) {
        var ttip = document.createElement("tooltip");
        ttip.id = self.id+"-theme-"+namespace+"-tooltip";
        var label_1 = document.createElement("label");
        var label_1_text = document.createTextNode(namespace);
        var img = document.createElement("image");
        img.setAttribute("src", image);
        label_1.appendChild(label_1_text);
        ttip.appendChild(label_1);
        ttip.appendChild(img);
        self.appendChild(ttip);
        mItem.tooltip = self.id+"-theme-"+namespace+"-tooltip";
      }
      return mItem;
    }
    // this function works very similarly to alertContents2
    function alertContents3() {
      if (http_request.readyState == 4) {
        if (http_request.status == 200) {
          result = http_request.responseXML;
          var allinputs = result.getElementsByTagName("input");
          var themes = [], themesImg = [], theme = "", themesPref = "", themesImgPref = "";
          for(var i = 0; i < allinputs.length; i++) {
            if((allinputs[i].getAttribute("name") == "theme")) {
              theme = allinputs[i].value;
              themes.push(theme); // our array of themes
              themesImg.push(allinputs[i].parentNode.parentNode.parentNode.previousSibling.previousSibling.getElementsByTagName("img")[0].src);
            }
          }
          for(var i = 0; i < themes.length; i++) {
            nItem(themes[i]); // add each theme to the menu by running them through the nItem function
            themesPref += (i == 0) ? themes[i] : ","+themes[i];
            themesImgPref += (i == 0) ? themesImg[i] : ","+themesImg[i];
            if(themes[i] == "") { // set the default theme's name, this is needed 'cause the name returned is always ""
              var defTheme = result.getElementById("edit-theme--wrapper").parentNode.previousSibling.firstChild.getElementsByTagName("label")[0].innerHTML;
              defTheme = defTheme.substr(0, defTheme.indexOf(":")); // removed the extra ": "
              cb.setPref(defThemePref, defTheme); // store the name in a pref
            }
          }
          cb.setPref(imgPref,themesImgPref);
          cb.setPref(pref,themesPref);
          self.setMenu(themes, themesImg); // add the menu to the button
          cb.alertSlide(self.label, l("AddedMenu"));
        } 
        else {
          cb.alertSlide(self.label, l("NotGetList"));
        }
      }
    }
    this.setTheme = function(value) {
      if(value == "refresh123") { // in the instance the refresh theme list was chosen
        makePOSTRequest(form_url, poststr, 3);
      }
      else {
        this.theme = value; // set this.theme to whatever value we get from clicking on the menu item
        makePOSTRequest(form_url, poststr, 1); // do the form submission with the above value
      }
    }
    if ((cb.isPref(pref)) && (!cb.isPref(imgPref))) { // if the "themes" pref exists then retrieve it and use it for our menuitems
      this.setMenu(cb.getPref(pref).split(","));
    }
    else if (cb.isPref(imgPref)) { // if the "themes" pref exists then retrieve it and use it for our menuitems
      this.setMenu(cb.getPref(pref).split(","), cb.getPref(imgPref).split(","));
    }
    else { // we need to run this function on first initialization to add the themes to the menu
      makePOSTRequest(form_url, poststr, 3);
    }
    // mouse handlers
    // we use the originalTarget part to keep the menu popup from show again after clicking a menu item
    this.leftclick = function(evt) { if (evt.originalTarget.id == this.id) this.showPopup(this); }
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.label = l("Label"); // set the label of the button dependent on language
    this.setAttribute("Help", l('Help'));
    // tooltip/dimming code
    this.tooltipText = this.label+"\n"+l("ChooseTheme");
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    // button attributes
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20090407.00');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/drupal-theme-switcher.html');

    Help Tab

    Left:
        Open the menu of themes.
    Left (on menu item):
        Changes to the chosen theme for the site
    Hover over menu item:
        See theme's thumbnail
    Right:
        Custom Buttons² Context Menu
  158. Duplicate tab

    Code Tab

    /*
        Left click the button to duplicate the current tab and select the new tab.
        Middle click the button to duplicate the current tab in the background.
        Right click the button to duplicate the current tab in a new window.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                       .getService(Components.interfaces.nsIWindowMediator);
    // ***** FUNCTIONS ***** //
    function dupeBG()
    {
            var SelectedTab = gBrowser.selectedTab;
            gBrowser.duplicateTab(SelectedTab);
            gBrowser.selectedTab = SelectedTab;
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
            gBrowser.duplicateTab(gBrowser.selectedTab);
    };
    this.midclick = function(evt) 
    {
            dupeBG();
    };
    this.cleftclick = function(evt)
    {
            dupeBG();
    };
    this.rightclick = function(evt) 
    {
            var SelectedTab = gBrowser.selectedTab;
    	window.open();
            var NewWin = wm.getMostRecentWindow ("navigator:browser");
            var cBrowser = NewWin.gBrowser;
            var DupeTab = cBrowser.duplicateTab(SelectedTab);
            cBrowser.mTabContainer.advanceSelectedTab(-1, true);
            cBrowser.removeCurrentTab();
    };
    // ***** INITIALISATION ***** //
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.tooltipText = "L: Duplicate current tab (focus)"+"\n"+"M: Duplicate current tab (background)"+"\n"+"R: Duplicate it in new window";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','4');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/duplicate-tab-button.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, CB2 2.0.*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to duplicate the current tab and select the new tab.
    Middle click the button to duplicate the current tab in the background.
    Right click the button to duplicate the current tab in a new window.
  159. Duplicate tab

    Code Tab

    /*
        Left click the button to duplicate the current tab and select the new tab.
        Middle click the button to duplicate the current tab in the background.
        Right click the button to duplicate the current tab in a new window.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                       .getService(Components.interfaces.nsIWindowMediator);
    // ***** FUNCTIONS ***** //
    function dupeBG()
    {
            var SelectedTab = gBrowser.selectedTab;
            gBrowser.duplicateTab(SelectedTab);
            gBrowser.selectedTab = SelectedTab;
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
            gBrowser.duplicateTab(gBrowser.selectedTab);
    };
    this.midclick = function(evt) 
    {
            dupeBG();
    };
    this.cleftclick = function(evt)
    {
            dupeBG();
    };
    this.rightclick = function(evt) 
    {
            var SelectedTab = gBrowser.selectedTab;
    	window.open();
            var NewWin = wm.getMostRecentWindow ("navigator:browser");
            var cBrowser = NewWin.gBrowser;
            var DupeTab = cBrowser.duplicateTab(SelectedTab);
            cBrowser.mTabContainer.advanceSelectedTab(-1, true);
            cBrowser.removeCurrentTab();
    };
    // ***** INITIALISATION ***** //
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.tooltipText = "L: Duplicate current tab (focus)"+"\n"+"M: Duplicate current tab (background)"+"\n"+"R: Duplicate it in new window";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','4');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/duplicate-tab-button.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, CB2 2.0.*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to duplicate the current tab and select the new tab.
    Middle click the button to duplicate the current tab in the background.
    Right click the button to duplicate the current tab in a new window.
  160. Duplicate tab

    Code Tab

    /*
        Left click the button to duplicate the current tab and select the new tab.
        Middle click the button to duplicate the current tab in the background.
        Right click the button to duplicate the current tab in a new window.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                       .getService(Components.interfaces.nsIWindowMediator);
    // ***** FUNCTIONS ***** //
    function dupeBG()
    {
            var SelectedTab = gBrowser.selectedTab;
            gBrowser.duplicateTab(SelectedTab);
            gBrowser.selectedTab = SelectedTab;
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
            gBrowser.duplicateTab(gBrowser.selectedTab);
    };
    this.midclick = function(evt) 
    {
            dupeBG();
    };
    this.cleftclick = function(evt)
    {
            dupeBG();
    };
    this.rightclick = function(evt) 
    {
            var SelectedTab = gBrowser.selectedTab;
    	window.open();
            var NewWin = wm.getMostRecentWindow ("navigator:browser");
            var cBrowser = NewWin.gBrowser;
            var DupeTab = cBrowser.duplicateTab(SelectedTab);
            cBrowser.mTabContainer.advanceSelectedTab(-1, true);
            cBrowser.removeCurrentTab();
    };
    // ***** INITIALISATION ***** //
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.tooltipText = "L: Duplicate current tab (focus)"+"\n"+"M: Duplicate current tab (background)"+"\n"+"R: Duplicate it in new window";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','4');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/duplicate-tab-button.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, CB2 2.0.*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to duplicate the current tab and select the new tab.
    Middle click the button to duplicate the current tab in the background.
    Right click the button to duplicate the current tab in a new window.
  161. Duplicate tab

    Code Tab

    /*
        Left click the button to duplicate the current tab and select the new tab.
        Middle click the button to duplicate the current tab in the background.
        Right click the button to duplicate the current tab in a new window.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                       .getService(Components.interfaces.nsIWindowMediator);
    // ***** FUNCTIONS ***** //
    function dupeBG()
    {
            var SelectedTab = gBrowser.selectedTab;
            gBrowser.duplicateTab(SelectedTab);
            gBrowser.selectedTab = SelectedTab;
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
            gBrowser.duplicateTab(gBrowser.selectedTab);
    };
    this.midclick = function(evt) 
    {
            dupeBG();
    };
    this.cleftclick = function(evt)
    {
            dupeBG();
    };
    this.rightclick = function(evt) 
    {
            var SelectedTab = gBrowser.selectedTab;
    	window.open();
            var NewWin = wm.getMostRecentWindow ("navigator:browser");
            var cBrowser = NewWin.gBrowser;
            var DupeTab = cBrowser.duplicateTab(SelectedTab);
            cBrowser.mTabContainer.advanceSelectedTab(-1, true);
            cBrowser.removeCurrentTab();
    };
    // ***** INITIALISATION ***** //
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.tooltipText = "L: Duplicate current tab (focus)"+"\n"+"M: Duplicate current tab (background)"+"\n"+"R: Duplicate it in new window";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','4');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/duplicate-tab-button.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, CB2 2.0.*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to duplicate the current tab and select the new tab.
    Middle click the button to duplicate the current tab in the background.
    Right click the button to duplicate the current tab in a new window.
  162. Duplicate Tab

    Code Tab

    gBrowser.duplicateTab(gBrowser.mCurrentTab);

    Initialization Tab

    /*Initialization Code*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','Eradicator');
    this.setAttribute('version','2007-11-11');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/tab-window-duplicate-tab-group.html');
    this.setAttribute('dependency','FF 2.0.0.*, cb2 2.0.02, Tab Mix Plus');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('help','1,Clicking on this button will duplicate the current tab\ninto a new one with browse history brought over too.\n\nThis button requires the Tab Mix Plus extension to be\ninstalled in order to work and as such will act like\nthe extensions duplicate tab feature honouring all\nsettings.');
    /*this.tooltipText += '  Duplicate Tab tool tip';*/
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

  163. Duplicate Tab to Window

    Code Tab

    gBrowser.duplicateInWindow(gBrowser.mCurrentTab);

    Initialization Tab

    /*Initialization Code*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','Eradicator');
    this.setAttribute('version','2007-11-11');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/tab-window-duplicate-tab-group.html');
    this.setAttribute('dependency','FF 2.0.0.*, cb2 2.0.02, Tab Mix Plus');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('help','1,Clicking on this button will duplicate the current tab\nto a new window with browse history brought over too.\n\nThis button requires the Tab Mix Plus extension to be\ninstalled in order to work and as such will act like\nthe extensions duplicate in new window feature\nhonouring all settings.');
    /*this.tooltipText += '  Duplicate Tab tool tip';*/
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

  164. Duplicate Tab, New Tab & Home Page All in One

    Code Tab

    /*代码*/

    Initialization Tab

    /*初始化代码*/
    /*Initialization code*/
    this.leftclick = function(e) {
    gBrowser.selectedTab = gBrowser.addTab('about:blank');
    }
    this.rightclick = function(e) {
    gBrowser.selectedTab = gBrowser.addTab(content.location);
    }
    this.midclick = function(e) {
    var homepage=gHomeButton.getHomePage();
    gBrowser.selectedTab = gBrowser.addTab(homepage);
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: New Tab|M: Home Page|R: Duplicate Tab";
    this.setAttribute('author','bimzcy');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/duplicate-tab-new-tab-home-page-all-one.html');

    Help Tab

  165. DuplicateTab²

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    this.leftclick   = function(evt){
    	this.doBrowsePref(evt);
    }
    this.rightclick  = function(evt){
    	this.doBrowsePrefNot(evt);;
    }
    this.setAttribute('onclick', 'gQuot(event, this)');	// Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------------------------------------
    	Function:  this.doBrowsePref(evt)
    	Args:	evt
    	Returns: Nothing
    	Calls:
    	Purpose: Retrieve open pref and open a duplicate url
    		   as called for by the pref.
    ----------------------------------------------------*/
    this.doBrowsePref = function(evt){
    	var openInTab, loadInBackground;
    	try {
    		openInwin = custombuttons.getPrefs( 'browser.link.open_newwindow' );
    		loadInBackground = custombuttons.getPrefs( 'browser.tabs.loadInBackground' )
    	} catch(ex) {
    		alert(ex)
    	}
    	var sUrl = gURLBar.value;
    	var url = sUrl;
    	handleURLBarRevert(); //reset the URL bar
    	if( openInwin == 'undefined' || openInwin == 3  ) {
    		var newTab = gBrowser.addTab(url);
    		if(!loadInBackground){
    			gBrowser.selectedTab = newTab;
    		}
    	} else {
    		window.open(url);
    	}
    }
    /*----------------------------------------------------
    	Function:  this.doBrowsePrefNot(evt)
    	Args:	evt
    	Returns: Nothing
    	Calls:
    	Purpose: Retrieve open pref and open a duplicate url
    		   opposite of that called for by the pref.
    ----------------------------------------------------*/
    this.doBrowsePrefNot = function(evt){
    	var openInTab, loadInBackground;
    	try {
    		openInwin = custombuttons.getPrefs( 'browser.link.open_newwindow' );
    		loadInBackground = custombuttons.getPrefs( 'browser.tabs.loadInBackground' )
    	} catch(ex) {
    		alert(ex)
    	}
    	var sUrl = gURLBar.value;
    	var url = sUrl;
    	handleURLBarRevert(); //reset the URL bar
    	if( openInwin == 'undefined' || openInwin != 3  ) {
    		var newTab = gBrowser.addTab(url);
    		if(!loadInBackground){
    			gBrowser.selectedTab = newTab;
    		}
    	} else {
    		window.open(url);
    	}
    }
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20080117.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/duplicatetab2.html');
    this.setAttribute('dependency','FF 2.0.0.*, cb2 2.0.02');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('help','0,Left click will re-load the current URL into a new tab\nor new window based on browser preferences.\n\nRight click will re-load the current URL into a new tab\nor new window based on the opposite of browser\npreferences.\n\nThe load in background preference will be honored\nwhen loading into a tab.');
    this.tooltipText += ' \n L=Clone URL Default \n M=Context \n R=Clone URL opposite of Default';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

      DuplicateTab² Behavior
      Left  click - Honors the browser preference
    			"browser.link.open_newwindow"
      Mid   click - Displays the button Context menu
      Right click - Opposite behavior of Left Click
    	This Button depends on Custom Buttons² Extension
    	version 2.0.02 or better. It depends on functions
    	not available in earlier versions.
    
  166. Easy Reader (1-click)

    Code Tab

    this.quot(event);

    Initialization Tab

    this.removeCSS = function() {
      var css=content.document.getElementById("visible-links-css");
      if (css) css.parentNode.removeChild(css);
    }
    this.quot = function(evt) {
      switch(this.pref) {
        case 1:
          var newSS, styles='* { font-family: arial ! important; font-size: 16px ! important; font-weight: bold ! important; background: white ! important; background-image: none ! important; border: none ! important; color: black ! important } :link, :link * { color: black ! important; text-decoration: none ! important } :visited, :visited * { color: black ! important; text-decoration: none ! important }';
          this.pref=0;
        break;
        case 0:
          this.removeCSS();
          this.pref=1;
          return;
        break;
      }
      this.removeCSS();
      newSS=content.document.createElement('link');
      newSS.id="visible-links-css";
      newSS.rel='stylesheet';
      newSS.href='data:text/css,'+escape(styles);
      content.document.getElementsByTagName("head")[0].appendChild(newSS);
    }
    this.pref=0;
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.style.opacity = '.99';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    this.setAttribute("author",'newf\n  Other contributers = m435tr0d');				// Stores Author.
    this.setAttribute("version",'20070508.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/easy-reader-1-click.html');	// Stores HomePage.
    this.setAttribute("dependency",'userChrome,FF 2.0,CB 0.0.2a');					// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute("help",'0,=================== Left-Click ====================\n\n  Toggles between "bold text/unstyled page" and "original page style"\n\n=================== Right-Click ===================\n\n  CB Context\n \n ');
    

    Help Tab

    %3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%20Left-Click%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0A%20%20Toggles%20between%20%22bold%20text/unstyled%20page%22%20and%20%22original%20page%20style%22%0A%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%20Right-Click%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0A%20%20CB%20Context%0A%20%0A%20
  167. Ebay Countdown

    Code Tab

     

    Initialization Tab

     this.quot = function(evt) {
    var link="http://countdown.ebay.com/countdown/start.jsp";
    var label="eBayCountdown";
    var head =(document.getElementById('sidebar-title').getAttribute('value') == label); 
      switch(evt.button) {
    case 2:
    this.showPopup(this);
    return;
    case 0:
       if (!head) {
          openWebPanel();
          var sbLoc = document.getElementById('sidebar').contentDocument.location;
          sbLoc.href = link;
          document.getElementById('sidebar-box').hidden = false;
          document.getElementById('sidebar-title').value = label;
          document.getElementById('sidebar-box').collapsed = false;
          document.getElementById('sidebar-splitter').hidden = false;
          return;
       }
       if (head) {
          document.getElementById('sidebar-title').value = null;
          document.getElementById('sidebar-box').hidden = true;
          document.getElementById('sidebar-box').collapsed = true;
          document.getElementById('sidebar-splitter').hidden = true;
          link="http://www.google.com";
          var sbLoc = document.getElementById('sidebar').contentDocument.location;
          sbLoc.href = link; 
          toggleSidebar();
       }
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
     document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    this.tooltipText = 'eBay Countdown';
    this.setAttribute('author','LRodman');
    this.setAttribute('version','1.0alpha');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sidebarbutton-maker-several-example-sidebar-buttons.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    }

    Help Tab

  168. Edit

    Code Tab

    if (content.document.body.contentEditable == "true")
    {
    content.document.body.contentEditable = "false";
    this.image='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gcBEzcYnyTLrAAAAjJJREFUeNqlkllI1FEYxX//FiSFtNQScWlxmZGaMEQrBZkkejEfeoigl55NfMgW9SlpoQxa1CQVLSc0FCZzS8pZULEsnBk1NaNxDJcKNxChGGr8egjLGaciOnDgPnzn3O+ecxUR4X+wZvlgfzNE18MSWts7/ygwV5UwPWp3N+iz9JOTniJB9Ijx3ikxdPZ6FRuLL4jW11/G83JkxjH2y6DuQSXlNw6hVrm4di6d5tKTYuhwN3lRly3rk44hc/Mk7FJj0tcAoCxnkBAfJ71VqeCc46vPTs4WtpCRVascTN7NYFO2RPiMMulSY5lNYtKoI6+6WXEzAIjXqMRWrQXnHC6/OI6eKKCo9Dp+i90EBa5jdGYzuvYJCm49UZY1imcLezUqsVZrYekzDpsJ3y1qQiJCePshkIbOMXKvPlZWziveatx/IFX0+QG4pi2Eb5yi3gT2tWnkFxuU39a4EhVnoln61E14wBT6LoiKgB6DkS7L+9W3iYgbzWUZMlXpL/IIqc9CBiuiRPTIx7vI4UjE9HxQVs67bXD8SJrsCzAQummBpg5wLCWSWRPGtw0aQoLgZiaYyk57f4Ktb1iSg508s6ppMMCr+W2cv/NS6TCblcRcJ+9mtzKxkELkl3HswyOyysCku402ejutbQMsxpZzSTf2MzBr/4iiaK3KODFoYlQ8Lb/snsHQ6wH27AiTtvtF4pmJJwuvXJTY0GDpt9kQkR8GLY2N/E3oyZraWkTE+z/4F3wHzxlLqFSJ73EAAAAASUVORK5CYII=';
    }
    else
    {
    content.document.body.contentEditable = "true"
    this.image='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gcBEzUTOsBwpgAAAp1JREFUeNp9kltIlGEQhp/v33/9VzMLa1MJC8PVtG7ywtTqIrvoYEVZUBcFgp3QKAopOiGSFNpBI6OyBKO6SFCzolIk6EAWhFDaUqZp66HTumnlKro6XUSbbof3Yy6+meHhnWEQEX7Fc/trSrLS5OTBjTI67xs3CnNkZ2y0uFwuNEYpMz5aYiO/kLpwKnl7UoW/qChvv6ywhlO4dTM58xJEifzue1i6RRKj3eh+Ok2fQqi894a9xyrUr3pt8ToZH7OWEccIifanXPf0j3WwIK1Yveia0P3t6yBRUz6yepHN6+TuhTSJCx9grqeITuM7R4fcrMo7qzRfi3FrzkxxjkQwPKQRFfaFpPD3ZK8PlKTIYYKDPbxyzWDwbTX78s8pAJWRnSHC2HFNAaH4d1wkf9tKuhuqGTIFEzqpj5efZ1PvMNiYdck7liqnXCxY8IUMYMWaXsH05KtMt3Rw+wmU3oIyu6jRfXo77fgCPAQQGtOILeUSYXzg5mOYORXSl8P21Agpqmj1QvQIIsYABANtViNzThzH2u+kth5aP0NyfBi2ae+R4TY2LImSK3ebFIDWRhvvvM9BC50Yuw5h7XNy7zUUH45jR6mohr54etxBJMWCTXuD3d7ycweVVImBgSDo+ONaVsPE+c109ZYRUJJLo9NMruxRANVnVkt3Ux0zJ6dQ7+xh06lypbmCHPRMaOdrUCdvJzcQuLSB1oceTAWXMbsj6aPFu5vFmZXqXUgWZQ8e8a3LQXtHB0rS6wSzAVg44j5N+lAKIYYN/Nyg69Q9qyHx6W7ley8lxeelqvwa6k5kqRjKDxAC8WeAQTwMA2BWOvebHnNAChX/kN7bPA4DCyD0/kx5i2bMOEf9/woILbBiwvTHIQFoaMzrSfgv4AcnASswynS0HgAAAABJRU5ErkJggg=='
    }
    if (content.document.designMode == "on")
    {
    content.document.designMode = "off";
    }
    else
    {
    content.document.designMode = "on"
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/edit-current-page-button.html');

    Help Tab

  169. Edit Button

    Code Tab

    /*Code*/
    var Cb = custombuttons;
    var bnum = prompt('Enter Button #');
    var bid = 'custombuttons-button' + String(bnum);
    this.oBtn = document.getElementById(bid);
    Cb.alertSlide("Edit " + this.oBtn.label, "ID " +this.oBtn.id);
    if ( this.oBtn ) {
    	Cb.editButton ( this.oBtn );
    }

    Initialization Tab

    /*Initialization Code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20090213.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/edit-button.html');
    this.setAttribute('dependency','Fx 2.0.0.4 - 3.2a1pre, Tb 2.0.0.19 - Tb 3.0b2pre, Calendar 1.0pre , CB2 2.0.0*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    No help developed for
    <label> button
    custombuttons-button<id>.
  170. Edit Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='edit-menu',popupID="cb2mBar-"+menuName+num;
    document.getElementById(menuName).setAttribute('collapsed','true');
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      that.appendChild(mPop);
    }
    setTimeout(this.initBtn, 5000);
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 1);
      }
    }
    that.hideDropMarker();
    this.type="menu";
    this.setAttribute("class", "menu-iconic");
    // mouseovers
    this.setAttribute("onmouseover", "this.hideDropMarker();" );
    // button attributes
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081211.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    // make it part of the button group for menubar-menus
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  171. Empty Trash/Compact Folders/Delete Junk

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler -------------------*/
    this.leftclick   = function(evt){
      goDoCommand('cmd_emptyTrash');
    }
    this.midclick    = function(evt){
      goDoCommand('cmd_compactFolder')
    }
    this.rightclick  = function(evt){
      goDoCommand('cmd_deleteJunk');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20090101');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/empty-trash-compact-folders-thunderbird.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    null
  172. Error Console Panel

    Code Tab

    var url = "chrome://global/content/console.xul";
    this.bottomPanel(url);
    

    Initialization Tab

    /* -------------------------------------------------------------
         Bottom Panel Function
         by LouCypher (aka Zoolcar9)
         Opens URL in a bottom panel
       ------------------------------------------------------------- */
    this.bottomPanel = function(url, contextmenu) {
      var panelID = "bottom-panel";
      var gPanel = document.getElementById(panelID);
      if(gPanel) {
        if(gPanel.firstChild.getAttribute("src").indexOf(url) == -1) {
          gPanel.firstChild.setAttribute("src", url);
          if(contextmenu) gPanel.setAttribute("contextmenu", contextmenu);
          else gPanel.removeAttribute("contextmenu");
        } else {
          gPanel.parentNode.removeChild(gPanel.previousSibling);
          gPanel.parentNode.removeChild(gPanel);
        }
      } else {
        var tbb = document.createElement("toolbarbutton");
            tbb.className = "tabs-closebutton";
            tbb.style.cursor = "pointer";
            tbb.setAttribute("oncommand",
                "this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); " +
                "this.parentNode.parentNode.removeChild(this.parentNode)");
        var spr = document.createElement("spacer");
            spr.setAttribute("flex", 1);
        var spl = document.createElement("splitter");
            spl.height = "28px";
            spl.appendChild(spr);
            spl.appendChild(tbb);
        var ifr = document.createElement("iframe");
            ifr.setAttribute("flex", 1);
            ifr.setAttribute("src", url);
        var box = document.createElement("box");
            box.id = panelID;
            box.height = "300px";
            box.appendChild(ifr);
        if(contextmenu) box.setAttribute("contextmenu", contextmenu);
        gBrowser.parentNode.appendChild(spl);
        gBrowser.parentNode.appendChild(box);
      }
    }  
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/error-console-bottom-panel-button.html');

    Help Tab

  173. Error Console Panel

    Code Tab

    var url = "chrome://global/content/console.xul";
    this.bottomPanel(url);
    

    Initialization Tab

    /* -------------------------------------------------------------
         Bottom Panel Function
         by LouCypher (aka Zoolcar9)
         Opens URL in a bottom panel
       ------------------------------------------------------------- */
    this.bottomPanel = function(url, contextmenu) {
      var panelID = "bottom-panel";
      var gPanel = document.getElementById(panelID);
      if(gPanel) {
        if(gPanel.firstChild.getAttribute("src").indexOf(url) == -1) {
          gPanel.firstChild.setAttribute("src", url);
          if(contextmenu) gPanel.setAttribute("contextmenu", contextmenu);
          else gPanel.removeAttribute("contextmenu");
        } else {
          gPanel.parentNode.removeChild(gPanel.previousSibling);
          gPanel.parentNode.removeChild(gPanel);
        }
      } else {
        var tbb = document.createElement("toolbarbutton");
            tbb.className = "tabs-closebutton";
            tbb.style.cursor = "pointer";
            tbb.setAttribute("oncommand",
                "this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); " +
                "this.parentNode.parentNode.removeChild(this.parentNode)");
        var spr = document.createElement("spacer");
            spr.setAttribute("flex", 1);
        var spl = document.createElement("splitter");
            spl.height = "28px";
            spl.appendChild(spr);
            spl.appendChild(tbb);
        var ifr = document.createElement("iframe");
            ifr.setAttribute("flex", 1);
            ifr.setAttribute("src", url);
        var box = document.createElement("box");
            box.id = panelID;
            box.height = "300px";
            box.appendChild(ifr);
        if(contextmenu) box.setAttribute("contextmenu", contextmenu);
        gBrowser.parentNode.appendChild(spl);
        gBrowser.parentNode.appendChild(box);
      }
    }  
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/error-console-bottom-panel-button.html');

    Help Tab

  174. Expand/Collapse Threads

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	goDoCommand('cmd_expandAllThreads');
    }
    this.midclick  = function(evt){
    }
    this.rightclick  = function(evt){
    	goDoCommand('cmd_collapseAllThreads');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20100202.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/expandcollapse-threads.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText = '  L: Expand    R: Collapse  ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/
    
  175. Extension Finder

    Code Tab

    /*Code*/
    /* -------------------------------------------------------------
         Extension Finder
         Search for extensions on the following sites:
           - Mozilla Addons
           - The Extensions Mirror
           - Extensions Room
           - mozdev.org
           - the web (uses Google search engine)
         with search priority is as follow:
           - selected text
           - searchbar
           - user input
         Use middle click to open the search results in a new tab
       ------------------------------------------------------------- */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    function getSelectedText() {
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var string = winWrapper.getSelection().toString();
      return string;
    }
    function getSearchBox() {
      var sQuery = null;
      var searchbar = document.getElementById("flock_searchbar") ||
                      document.getElementById("searchbar");
      if (searchbar) {
        var searchbox = searchbar.mTextbox || searchbar._textbox;
        var sEngine = searchbar._ss
                      ? searchbar._ss.currentEngine.name
                      : searchbar.tooltipText.replace(/^Search\s/, "");
        var sInput = searchbox.value.replace(/\sSearch$/, "") || searchbox.value;
        if(sEngine == sInput ||
          (searchbox.firstChild && searchbox.firstChild.src == "") ||
           searchbar.hasAttribute("empty")) sQuery = "";
        else sQuery = searchbox.value;
      }
      return sQuery;
    }
    function getInput() {
      var p = prompt("Query:", "", "Find extensions");
      return p;
    }
    function addMenuItem(aNode, aLabel, aValue) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("label", aLabel);
      mi.value = aValue;
    }
    this.checkForMiddleClick = function(aNode, aEvent) {
      if(aEvent.button == 1) {
        var fn = new Function("event", "this.findExtensions(event)");
        fn.call(aNode, aEvent);
      }
      closeMenus(aEvent.target);
    }
    this.findExtensions = function(aEvent) {
      var query = getSelectedText() || getSearchBox() || getInput();
      if(query) openUILink(aEvent.target.value + query, aEvent, false, true);
    }
    var mItems = [
      { label: "Mozilla Addons",
        url: "https://addons.mozilla.org/en-US/firefox/search?q=" },
      { label: "The Extensions Mirror",
        url: "http://www.extensionsmirror.nl/index.php?" +
             "act=Search&CODE=01&forums=20&searchsubs=1&keywords=" },
      { label: "Extension Room",
        url: "http://www.google.com/search?sitesearch=extensionroom.mozdev.org" +
             "&domains=addons.mozilla.org;extensionsmirror.nl;" +
             "extensionroom.mozdev.org;mozdev.org&q=" },
      { label: "mozdev.org",
        url: "http://www.google.com/search?sitesearch=mozdev.org" +
             "&domains=addons.mozilla.org;extensionsmirror.nl;" +
             "extensionroom.mozdev.org;mozdev.org&q=" },
      { label: "the Web",
        url: "http://www.google.com/search?domains=addons.mozilla.org;" +
             "extensionsmirror.nl;extensionroom.mozdev.org;mozdev.org&q=" }
    ]
    var mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute("oncommand",
      "this.parentNode.findExtensions(event)");
    mPopup.setAttribute("onclick",
      "this.parentNode.checkForMiddleClick(this.parentNode, event)");
    for(var i = 0; i < mItems.length; i++) {
      var mItem = mItems[i];
      addMenuItem(mPopup, mItem.label, mItem.url);
    }
    this.type = "menu";
    this.removeAttribute("oncommand");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/extension-finder.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  176. Extension List

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    var data = <window
      onload={"opener.document.getElementById(\"" + this.id + "\").load()"}
      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
        <keyset>
          <key keycode="VK_ESCAPE" oncommand="close()"/>
        </keyset>
        <vbox flex="1">
          <textbox id="textbox" multiline="true" readonly="false" flex="1"/>
          <hbox>
            <button label="Copy" oncommand={"opener.document.getElementById(\"" + this.id + "\").copy()"}/>
          </hbox>
        </vbox>
    </window>;
    var bool = XML.prettyPrinting;
    XML.prettyPrinting = false;
    data = '<?xml version="1.0"?><?xml-stylesheet href="chrome://global/skin/" type="text/css"?>' + data.toXMLString();
    XML.prettyPrinting = bool;
    var dialog;
    this.leftclick = function(event) {
      var url = "data:application/vnd.mozilla.xul+xml;text/plain," + data;
      var feature = "chrome,centerscreen,width=400,height=200,dialog=no";
      dialog = window.openDialog(url, "", feature);
    }
    this.load = function() {
      var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].
        getService(Components.interfaces.nsIXULAppInfo);
      var extensionManager = Components.classes["@mozilla.org/extensions/manager;1"].
        getService(Components.interfaces.nsIExtensionManager);
      var type = Components.interfaces.nsIUpdateItem.TYPE_EXTENSION;
      var count = new Object();
      var list = extensionManager.getItemList(type, count);
      var out = new Array();
      for (var i = 0; i < count.value; i++) {
        out.push("* " + list[i].name + " " + list[i].version);
      }
      out.sort();
      out.unshift(appInfo.name + " " + appInfo.version + " Gecko " + appInfo.platformVersion, "");
      dialog.document.title = "Extension List ( " + count.value + " )";
      dialog.document.getElementById("textbox").value = out.join("\n");
    }
    this.copy = function() {
      if (navigator.platform.toLowerCase().indexOf("win")) {
        gClipboard.write(dialog.document.getElementById("textbox").value);
      } else {
        gClipboard.write(dialog.document.getElementById("textbox").value.replace(/\n/g, "\r\n"));
      }
      dialog.close();
    }
    this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "3.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/extension-list.html');
    this.setAttribute("dependency", "FF 3.*, CB2 3.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  177. Extensions

    Code Tab

    /*Code*/
    /* -------------------------------------------------------------
       Extensions Menu
       Based on snippet by onemen
       http://forums.mozillazine.org/viewtopic.php?p=1774082#1774082
       Modified by LouCypher (aka Zoolcar9)
       ------------------------------------------------------------- */
    // if ( !event.ctrlKey ) {
    //	if ( typeof aios_getObjects == "function" ) {
    //		toggleSidebar("viewAddonsSidebar");
    //	} else {
    //		let title = "Extensions in Sidebar"
    //		let link = "chrome://mozapps/content/extensions/extensions.xul";
    //		if (/Extensions \[/.test( document.getElementById('sidebar-title').getAttribute('value') ) ) {
    //			toggleSidebar();
    //		} else {
    //			if (/extensions\.xul$/.test( link )) {
    //				toggleSidebar('viewWebPanelsSidebar', true);
    //				document.getElementById('sidebar').setAttribute('src', link );
    //				document.getElementById('sidebar-title').setAttribute('value', title );
    //			} else {
    //				openWebPanel( title, link );
    //			}
    //		}
    //	}
    // } else {
    //	gBrowser.selectedTab = gBrowser.addTab('chrome://mozapps/content/extensions/extensions.xul?type=extensions');
    // }
    if( typeof BrowserOpenAddonsMgr == "function" )
      BrowserOpenAddonsMgr();
    else
      BrowserOpenExtensions( "extensions" );
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    const Cb = custombuttons;
    const EXTENSION = Ci.nsIUpdateItem.TYPE_EXTENSION;
    function prop( aElement, aString ) {
      var emRDF = "http://www.mozilla.org/2004/em-rdf#";
      var arc = RDFService.GetResource(emRDF+ aString);
      var target = extensionDS.GetTarget(aElement, arc, true);
      if(target instanceof Ci.nsIRDFLiteral) return target.Value;
      if(target instanceof Ci.nsIRDFInt) return target.Value;
      return null;
    }
    var mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute("oncommand", "event.stopPropagation()");
    var RDFService  = Cc["@mozilla.org/rdf/rdf-service;1"].getService(Ci.nsIRDFService);
    var Container   = Cc["@mozilla.org/rdf/container;1"].getService(Ci.nsIRDFContainer);
    var extensionDS = Cc["@mozilla.org/extensions/manager;1"].getService(Ci.nsIExtensionManager).datasource;
    var root;
    try {
      root = RDFService.GetResource("urn:mozilla:item:root");
    } catch(err) {
      root = RDFService.GetResource("urn:mozilla:extension:root");
    }
    Container.Init(extensionDS,root);
    var elements = Container.GetElements();
    var extensionArray = [];
    var i = -1;
    while(elements.hasMoreElements()) {
      i++;
      var element=elements.getNext();
      element.QueryInterface(Components.interfaces.nsIRDFResource);
      var prop_OptionsURL = prop(element, "optionsURL");
      if(prop(element, "type") == EXTENSION &&  prop_OptionsURL) {
        var prop_name = prop(element, "name");
        extensionArray[i] = [];
        extensionArray[i] [0] = prop_name.charAt(0).toUpperCase() + prop_name.substr(1);
        extensionArray[i] [1] = prop_OptionsURL;
        extensionArray[i] [2] = prop(element, "userDisabled");
        extensionArray[i] [3] = prop(element, "version");
        extensionArray[i] [4] = prop(element, "iconURL");
        if(!extensionArray[i] [4])
          extensionArray[i] [4] = "chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png";
      }
    }
    extensionArray.sort();
    var features = "chrome, dialog = 0, resizable, titlebar, toolbar, centerscreen";
    var extCommand = "window.openDialog('ZZZ', '', '" + features + "');";
    for(var i = 0; i < extensionArray.length; i++) {
      var extArray = extensionArray[i];
      try {
        var mItem = document.createElement("menuitem");
        mItem.setAttribute("label", extArray[0] + " " + extArray[3]);
        if(extArray[4]) {
          mItem.setAttribute("class", "menuitem-iconic bookmark-item");
          mItem.setAttribute("image", extArray[4]);
        }
        if(extArray[1])
          mItem.setAttribute("oncommand", extCommand.replace("ZZZ", extArray[1]));
        if(extArray[2]) mItem.setAttribute("disabled", true);
        mPopup.appendChild(mItem);
      } catch(e) {
      }
    }
    this.type = "menu-button";
    if(typeof Local_Install != "object") return;
    var test = document.getElementById("cbContext-extensions");
    if(test) test.parentNode.removeChild(test);
    var cbPopup = document.getElementById("custombuttons-contextpopup-subCall").cloneNode(true); // Cb context
    // var subPopup = document.createElement("menupopup");
    // subPopup.appendChild(cbPopup);
    // subPopup.appendChild(cbPopup.lastChild);
    var subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.setAttribute("image", Cb.defaultImg() );
    subMenu.appendChild(cbPopup.lastChild);
    var extensionsPopup = document.getElementById("emb-context");
    var popup = extensionsPopup.cloneNode(true);
    popup.id = "cbContext-extensions";
    popup.appendChild(document.createElement("menuseparator"));
    popup.appendChild(subMenu);
    //popup.appendChild(subPopup);
    extensionsPopup.parentNode.appendChild(popup);
    this.setAttribute("context", popup.id);
    this.onclick = function(aEvent) {
      custombuttons.Dump("onclick called");
      if(aEvent.button === 1) gBrowser.selectedTab = gBrowser.addTab('chrome://mozapps/content/extensions/extensions.xul?type=extensions');
    }
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute( 'onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute(  'onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute("author","LouCypher, SCClockDr, rawny");
    this.setAttribute("version","20090314.02");
    this.setAttribute('dependency','Fx 2.0.0.4 - 3.2a1pre, Tb 2.0.0.19 - Tb 3.0b2pre, Calendar 1.0pre , CB2 2.0.0*');
    this.setAttribute("status","complete");
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/extensions-menu-button.html');

    Help Tab

    **********************************************************************
     Left Click =
         Load the Extensions Dialog into a new tab.
     Left Click on the menu dropmarker = 
         Pop up the Extensions options select list menu.
           Selecting an extension from this list will
           popup its options dialog.
     Right Click =
         Pop up the button's Context menu.
           From this menu you can select various extension menu options
           or the Custom Buttons² context menuitem.
     Credits:
       LouCypher - Original Concept and coding.
       SCClockdr - Button enhancemants related to Custom Buttons².
  178. Extensions in Sidebar

    Code Tab

    /*Code*/
    /* -------------------------------------------------------------
       Extensions Menu
       Based on snippet by onemen
       http://forums.mozillazine.org/viewtopic.php?p=1774082#1774082
       Modified by LouCypher (aka Zoolcar9)
       ------------------------------------------------------------- */
    if ( !event.ctrlKey ) {
    	if ( typeof aios_getObjects == "function" ) {
    		toggleSidebar("viewAddonsSidebar");
    	} else {
    		let title = "Extensions in Sidebar"
    		let link = "chrome://mozapps/content/extensions/extensions.xul";
    		if (/Extensions \[/.test( document.getElementById('sidebar-title').getAttribute('value') ) ) {
    			toggleSidebar();
    		} else {
    			if (/extensions\.xul$/.test( link )) {
    				toggleSidebar('viewWebPanelsSidebar', true);
    				document.getElementById('sidebar').setAttribute('src', link );
    				document.getElementById('sidebar-title').setAttribute('value', title );
    			} else {
    				openWebPanel( title, link );
    			}
    		}
    	}
    } else {
    	gBrowser.selectedTab = gBrowser.addTab('chrome://mozapps/content/extensions/extensions.xul?type=extensions');
    }
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    const Cb = custombuttons;
    const EXTENSION = Ci.nsIUpdateItem.TYPE_EXTENSION;
    function prop( aElement, aString ) {
      var emRDF = "http://www.mozilla.org/2004/em-rdf#";
      var arc = RDFService.GetResource(emRDF+ aString);
      var target = extensionDS.GetTarget(aElement, arc, true);
      if(target instanceof Ci.nsIRDFLiteral) return target.Value;
      if(target instanceof Ci.nsIRDFInt) return target.Value;
      return null;
    }
    var mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute("oncommand", "event.stopPropagation()");
    var RDFService  = Cc["@mozilla.org/rdf/rdf-service;1"].getService(Ci.nsIRDFService);
    var Container   = Cc["@mozilla.org/rdf/container;1"].getService(Ci.nsIRDFContainer);
    var extensionDS = Cc["@mozilla.org/extensions/manager;1"].getService(Ci.nsIExtensionManager).datasource;
    var root;
    try {
      root = RDFService.GetResource("urn:mozilla:item:root");
    } catch(err) {
      root = RDFService.GetResource("urn:mozilla:extension:root");
    }
    Container.Init(extensionDS,root);
    var elements = Container.GetElements();
    var extensionArray = [];
    var i = -1;
    while(elements.hasMoreElements()) {
      i++;
      var element=elements.getNext();
      element.QueryInterface(Components.interfaces.nsIRDFResource);
      var prop_OptionsURL = prop(element, "optionsURL");
      if(prop(element, "type") == EXTENSION &&  prop_OptionsURL) {
        var prop_name = prop(element, "name");
        extensionArray[i] = [];
        extensionArray[i] [0] = prop_name.charAt(0).toUpperCase() + prop_name.substr(1);
        extensionArray[i] [1] = prop_OptionsURL;
        extensionArray[i] [2] = prop(element, "userDisabled");
        extensionArray[i] [3] = prop(element, "version");
        extensionArray[i] [4] = prop(element, "iconURL");
        if(!extensionArray[i] [4])
          extensionArray[i] [4] = "chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png";
      }
    }
    extensionArray.sort();
    var features = "chrome, dialog = 0, resizable, titlebar, toolbar, centerscreen";
    var extCommand = "window.openDialog('ZZZ', '', '" + features + "');";
    for(var i = 0; i < extensionArray.length; i++) {
      var extArray = extensionArray[i];
      try {
        var mItem = document.createElement("menuitem");
        mItem.setAttribute("label", extArray[0] + " " + extArray[3]);
        if(extArray[4]) {
          mItem.setAttribute("class", "menuitem-iconic bookmark-item");
          mItem.setAttribute("image", extArray[4]);
        }
        if(extArray[1])
          mItem.setAttribute("oncommand", extCommand.replace("ZZZ", extArray[1]));
        if(extArray[2]) mItem.setAttribute("disabled", true);
        mPopup.appendChild(mItem);
      } catch(e) {
      }
    }
    this.type = "menu-button";
    if(typeof Local_Install != "object") return;
    var test = document.getElementById("cbContext-extensions");
    if(test) test.parentNode.removeChild(test);
    var cbPopup = document.getElementById("custombuttons-contextpopup-subCall").cloneNode(true); // Cb context
    // var subPopup = document.createElement("menupopup");
    // subPopup.appendChild(cbPopup);
    // subPopup.appendChild(cbPopup.lastChild);
    var subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.setAttribute("image", Cb.defaultImg() );
    subMenu.appendChild(cbPopup.lastChild);
    var extensionsPopup = document.getElementById("emb-context");
    var popup = extensionsPopup.cloneNode(true);
    popup.id = "cbContext-extensions";
    popup.appendChild(document.createElement("menuseparator"));
    popup.appendChild(subMenu);
    //popup.appendChild(subPopup);
    extensionsPopup.parentNode.appendChild(popup);
    this.setAttribute("context", popup.id);
    this.onclick = function(aEvent) {
      if(aEvent.button === 1) gBrowser.selectedTab = gBrowser.addTab('chrome://mozapps/content/extensions/extensions.xul?type=extensions');
    }
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute( 'onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute(  'onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute("author","LouCypher, SCClockDr, rawny");
    this.setAttribute("version","20090314.02");
    this.setAttribute('dependency','Fx 2.0.0.4 - 3.2a1pre, Tb 2.0.0.19 - Tb 3.0b2pre, Calendar 1.0pre , CB2 2.0.0*');
    this.setAttribute("status","complete");
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/extensions-menu-button.html');

    Help Tab

    **********************************************************************
     Left Click =
         Load the Extensions Dialog into the Sidebar.
     Left Click on the menu dropmarker = 
         Pop up the Extensions options select list menu.
           Selecting an extension from this list will
           popup its options dialog.
     Middle Click or Ctrl + Left Click = 
         Load the Extensions Dialog into a new tab.
     Right Click =
         Pop up the button's Context menu.
           From this menu you can select various extension menu options
           or the Custom Buttons² context menuitem.
     Credits:
       LouCypher - Original Concept and coding.
       SCClockdr - Button enhancemants related to Custom Buttons².
  179. External Application Button with Sub Menu and Link Support

    Code Tab

    this.siteGo(event);
    

    Initialization Tab

    var srcUrl,MItem,mPop;
    var sImg = this.image;
    /*
    To add a submenu create a new array using the array sub as an example (rename it),
    then link to the submenu by adding a menuitem in the apps array which has the name
    of the submenu array as it's third array item. 
    The menuitem needs to have a 1 in it's first array item (this indicates
    it has a submenu).  You may create as many submenus as you like and
    can additionally create submenus within submenus.
    */
    //------Sub Menu items--------
    sub=new Array; // notice the name of this array
    sub.push([0, 'Explorer', 'C:/WINDOWS/explorer.exe', sImg, 'app']);
    sub.push([0,'separator']);
    sub.push([0, 'Item 3', 'http://custombuttons2.com/', sImg, 'link']);
    sub.push([0, 'Item 3', 'http://custombuttons2.com/', sImg, 'link']);
    //------Main Menu items--------
    apps=new Array;
    // here is where I link the prior named array, see the name sub?
    // I also insert a 1 instead of 0, this indicates it has a submenu
    apps.push([1, 'Item 1', sub, sImg]);
    apps.push([0, 'separator']);
    apps.push([0, 'Item 2', 'http://custombuttons2.com/', sImg, 'link']);
    apps.push([0, 'Item 3', 'http://custombuttons2.com/', sImg, 'link']);
    //------FUNCTIONS FOR ADDING MENU ITEMS------
    //------menu items-------
    MItem=function(apps,value){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',apps[value][1]);
      mItem.value = apps[value][2];
      mItem.tooltipText = apps[value][1];
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',apps[value][3]);
      mItem.setAttribute('type',apps[value][4]);
      return mItem;
    }
    nItem=function(label,value){
      var mItem=document.createElement('menuitem'); 
      mPop=document.createElement('menupopup');
      mPop=createMenu(mPop,apps);
      mItem.value = value;
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',document.getElementById("page-proxy-favicon").src);
      return mItem;
    }
    mPop=document.createElement('menupopup');
    mPop=createMenu(mPop,apps);
    function createMenu(menu,aray) {
      for (var i=0;i<aray.length;i++) {
        if(aray[i] [0]==0) {
          if (aray[i] [1] =='separator') {
            menu.appendChild(document.createElement('menuseparator'));
          }
          else {
            menu.appendChild(MItem(aray,i));
          }
        }
        else {
          var sMenu=document.createElement('menu');
          sMenu.setAttribute('label',aray[i] [1]);
          sMenu.setAttribute('class','menuitem-iconic');
          sMenu.setAttribute('image',aray[i] [3]);
          var subMenu=document.createElement('menupopup');
          subMenu.setAttribute('orient','horizontal');
          subMenu=createMenu(subMenu,aray[i] [2]);
          sMenu.appendChild(subMenu);
          menu.appendChild(sMenu);
          //alert(subMenu.lastChild());
        }
      }	
      return menu;
    }
    this.startProcess=function(path,args){
      var file = Components.classes['@mozilla.org/file/local;1']
                           .createInstance(Components.interfaces.nsILocalFile);
      var process = Components.classes['@mozilla.org/process/util;1']
                              .getService(Components.interfaces.nsIProcess);
      file.initWithPath(path.replace(/\//g,'\\\\')); 
      file.launch();
    }
    //------DEFINES ACTIONS FOR SITES------
    this.siteGo=function(evt) {
      var value = evt.target.value;
      var type = evt.target.getAttribute("type");
      if (type == "link") gBrowser.selectedTab = gBrowser.addTab(value); //USE NEW TAB
      if (type == "app") this.startProcess(value);
    }
    this.appendChild(mPop);
    this.type = "menu"; this.setAttribute("class", "menu-iconic");// MAKES THIS A 'BUTTON MENU'
    //this.type = "menu-button"; // MAKES THIS A 'MENU BUTTON'
    this.value=-1;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/external-applications.html');

    Help Tab

  180. External Applications

    Code Tab

    /*Code*/

    Initialization Tab

    var apps=new Array;
    //------menu items--------
    var expImg=this.image;
    var calImg=this.image;
    var ieImg=this.image;
    var npImg=this.image;
    var cmdImg=this.image;
    var TBImg=this.image;
    var cpImg=this.image;
    var epImg=this.image;
    apps.push(['Explorer',expImg,'c:/windows/explorer.exe']);
    apps.push(['Calculator',calImg,'C:/WINDOWS/system32/calc.exe']);
    apps.push(['Cmd Prompt',cmdImg,'C:/WINDOWS/system32/cmd.exe']);
    apps.push('separator');
    apps.push(['IE',ieImg,'c:/Program files/Internet Explorer/IEXPLORE.EXE']);
    apps.push(['Notepad',npImg,'c:/windows/notepad.exe']);
    apps.push(['Control Panel',cpImg,'C:/WINDOWS/system32/control.exe']);
    apps.push(['Thunder bird',TBImg,'D:/softwares installed here/Thunder Bird 1.5/thunderbird.exe']);
    apps.push(['Edit Plus',epImg,'C:/Program Files/EditPlus 2/editplus.exe']);
    //------menu items-------
    var nMItem=function(label,img,path,args,obj){
      var m=document.createElement('menuitem');
      m.setAttribute('label',label);
      m.f=obj.startProcess.bind(obj);
      m.setAttribute('oncommand','this.f("'+path+'","'+args+'")');
      m.setAttribute('class','menuitem-iconic');
      m.setAttribute('image',img);
      m.tooltipText = label;
      return m;
    }
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    this.orient="horizontal";
    var mP=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mP.appendChild(document.createElement('menuseparator'));
     }else{
      if (!apps[i] [3]) apps[i] [3]='';
      mP.appendChild(nMItem(apps[i] [0],apps[i] [1],apps[i] [2],apps[i] [3],this));
     }
    }
    this.appendChild(mP);
    this.type='menu';
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/external-applications.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    null
  181. External Applications & URL's

    Code Tab

    /*Code*/

    Initialization Tab

    var apps=new Array;
    //------menu items--------
    var expImg=this.image;
    var calImg=this.image;
    var ieImg=this.image;
    var npImg=this.image;
    var cmdImg=this.image;
    var TBImg=this.image;
    var cpImg=this.image;
    var epImg=this.image;
    apps.push(['Explorer',expImg,'c:/windows/explorer.exe', '', 'app']);
    apps.push(['Calculator',calImg,'C:/WINDOWS/system32/calc.exe', '', 'app']);
    apps.push(['Cmd Prompt',cmdImg,'C:/WINDOWS/system32/cmd.exe', '', 'app']);
    apps.push('separator');
    apps.push(['IE',ieImg,'c:/Program files/Internet Explorer/IEXPLORE.EXE', '', 'app']);
    apps.push(['Notepad',npImg,'c:/windows/notepad.exe', '', 'app']);
    apps.push(['Control Panel',cpImg,'C:/WINDOWS/system32/control.exe', '', 'app']);
    apps.push(['Thunder bird',TBImg,'D:/softwares installed here/Thunder Bird 1.5/thunderbird.exe', '', 'app']);
    apps.push(['Edit Plus',epImg,'C:/Program Files/EditPlus 2/editplus.exe', '', 'app']);
    apps.push(['Google','http://www.google.com/favicon.ico','http://www.google.com/','', 'link']);
    // Application template
    apps.push(['appName',expImg,'pathToApp','','app']);
    // URL Link template
    apps.push(['pageName','urlToFavicon','websiteUrl','','link']);
    // Separator
    apps.push('separator');
    //------menu items-------
    var nMItem=function(label,img,path,args,obj,type){
      var m=document.createElement('menuitem');
      m.setAttribute('label',label);
      m.f=obj.startProcess.bind(obj);
      // ONLY USE ONE OF THE FOLLOWING LINES
      /*Next line for New tab foreground*/
          //var cmd = (type == "app") ? 'this.f("'+path+'","'+args+'")' : "if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI('"+path+"');else gBrowser.selectedTab=gBrowser.addTab('"+path+"');";
      /*Next line for New tab background*/
          //var cmd = (type == "app") ? 'this.f("'+path+'","'+args+'")' : "if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI('"+path+"');else gBrowser.addTab('"+path+"');";
      /*Next line for Current tab*/
          var cmd = (type == "app") ? 'this.f("'+path+'","'+args+'")' : 'loadURI("'+path+'");';
      // END LINES FOR TAB CLICKING PREFERENCE
      m.setAttribute('oncommand',cmd);
      m.setAttribute('class','menuitem-iconic');
      m.setAttribute('image',img);
      m.tooltipText = label;
      return m;
    }
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    this.orient="horizontal";
    var mP=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mP.appendChild(document.createElement('menuseparator'));
     }else{
      if (!apps[i] [3]) apps[i] [3]='';
      mP.appendChild(nMItem(apps[i] [0],apps[i] [1],apps[i] [2],apps[i] [3],this,apps[i] [4]));
     }
    }
    this.appendChild(mP);
    this.type='menu';
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04,nicholas');
    this.setAttribute('version','20090316.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/external-applications.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/external-applications.html');

    Help Tab

    null
  182. Fave it!

    Code Tab

    loadURI("javascript:{var w=window;w.l=w.location;w.SdP='secure.';w.bU=(w.l.protocol=='https:'?'https://'+w.SdP:'http://')+'faves.com';w.eUC=encodeURIComponent;function fBkF(){w.l.href=w.bU+'/Authoring.aspx?u='+w.eUC(w.l.href)+'&t='+w.eUC(document.title);}w.gT=w.setTimeout(fBkF,6999);w.d=w.document;w.sT=w.d.body;w.o=w.d.createElement('scri'+'pt');if(typeof w.o!='object')fBkF();w.o.setAttribute('src',w.bU+'/js/Authoring.js');w.o.setAttribute('type','text/javascript');void(w.sT.appendChild(w.o));}");

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080409.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/fave-it.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  183. Fave it!

    Code Tab

    loadURI("javascript:{var w=window;w.l=w.location;w.SdP='secure.';w.bU=(w.l.protocol=='https:'?'https://'+w.SdP:'http://')+'faves.com';w.eUC=encodeURIComponent;function fBkF(){w.l.href=w.bU+'/Authoring.aspx?u='+w.eUC(w.l.href)+'&t='+w.eUC(document.title);}w.gT=w.setTimeout(fBkF,6999);w.d=w.document;w.sT=w.d.body;w.o=w.d.createElement('scri'+'pt');if(typeof w.o!='object')fBkF();w.o.setAttribute('src',w.bU+'/js/Authoring.js');w.o.setAttribute('type','text/javascript');void(w.sT.appendChild(w.o));}");

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080409.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/fave-it.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  184. FEBE

    Code Tab

    /*Code*/
    //====================================================================

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	if(!febeInit()){window.openDialog('chrome://febe/content/febeOptions.xul','','','DestDirID')};
    }
    this.midclick    = function(evt){
    	febeOptions();
    }
    this.rightclick  = function(evt){
    	febeRestoreProfile();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*-------------- un-comment to show mouseover effects -----------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25, KuRmA');
    this.setAttribute('version','20071111.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/febe-button.html');
    this.setAttribute('dependency','FEBE');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText += '\n  L: Backup  M: Options  R: Restore ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    /*Help*/%0A%0ARequires%20the%20FEBE%20extension%0A%20https%3A//addons.mozilla.org/firefox/2109/%0A%0A%09Left%3A%09Run%20Backup%20%0A%09Middle%3A%09FEBE%20Options%20%0A%09Right%3A%09Restore%20Profile%20%0A%0A%09Shift%20+%20R%3A%20Context%20Menu%0A%09%0ADiscussion%20%26%20Support%09http%3A//custombuttons2.com/forum/viewtopic.php%3Ff%3D36%26t%3D345
  185. Feign iPhone Mode

    Code Tab

    if (!this.checked) {
     this.PS.setCharPref(this.pref,'Mobile Safari 1.1.3 - iPhone');
    } else {
     this.PS.clearUserPref(this.pref);
    }
    

    Initialization Tab

    this.pref = 'general.useragent.override';
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.setChecked = function() {
     this.checked =  this.PS.prefHasUserValue(this.pref) && this.PS.getCharPref(this.pref);
    }
    this.ob = {}
    this.ob.observe = this.setChecked.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setChecked();
    this.setAttribute('author','Louis H');
    this.setAttribute('version','20090108_0031');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/feign-iphone-mode.html');
    this.setAttribute('public',true);

    Help Tab

  186. FFFFOUND!

    Code Tab

    loadURI("javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://ffffound.com/bookmarklet.js');document.body.appendChild(e)})());");

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080722.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/ffffound-button.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.6*');
    this.setAttribute('status','Final');
    this.setAttribute('public',true);

    Help Tab

  187. File Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='file-menu',popupID="cb2mBar-"+menuName+num;
    document.getElementById(menuName).setAttribute('collapsed','true');
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      that.appendChild(mPop);
    }
    setTimeout(this.initBtn, 5000);
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 1);
      }
    }
    that.hideDropMarker();
    this.type="menu";
    this.setAttribute("class", "menu-iconic");
    // mouseovers
    this.setAttribute("onmouseover", "this.hideDropMarker();" );
    // button attributes
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081211.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    // make it part of the button group for menubar-menus
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  188. Find in This Page

    Code Tab

    var findToolbar = document.getElementById("FindToolbar");
    if (typeof gFindBar == "object") { //Bon Echo 2.0a3
    	if(findToolbar.hidden) {
    		gFindBar.onFindCommand();;
    		this.checked=true;
    	} else {
    		gFindBar.close();
    		this.checked=false;
    	} // End if (findToolbar.hidden)
    } 
    else {
    	if(findToolbar.hidden){
    		onFindCmd();
    	} else {
    		closeFindBar();
    	} // End if (findToolbar.hidden)
    } // End if (typeof gFindBar == "object")

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','Anonymous,SCClockDr');
    this.setAttribute('version','20090207.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/find-page.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.0*');
    this.setAttribute("status","complete");
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    Help not developed for
    <label> button
    custombuttons-button<id>.
  189. Find Search History

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(event) {
      gFindBar.open();
      if (!gFindBar.getElement("findbar-textbox").value) {
        var str = BrowserSearch.searchBar.value;
        if (document.getElementById("GBL-SearchBox"))
          str = str || document.getElementById("GBL-SearchBox").value;
        if (str) gFindBar.getElement("findbar-textbox").value = str;
        else gFindBar.getElement("findbar-textbox").focus();
      }
      gFindBar.onFindAgainCommand(0); // Find Next
    }
    this.sleftclick = function(event) {
      gFindBar.open();
      if (!gFindBar.getElement("findbar-textbox").value) {
        var str = BrowserSearch.searchBar.value;
        if (document.getElementById("GBL-SearchBox"))
          str = str || document.getElementById("GBL-SearchBox").value;
        if (str) gFindBar.getElement("findbar-textbox").value = str;
        else gFindBar.getElement("findbar-textbox").focus();
      }
      gFindBar.onFindAgainCommand(1); // Find Previous
    }
    this.midclick = function(event) {
      if (gFindBar.hidden) {
        gFindBar.open();
        gFindBar.getElement("findbar-textbox").focus();
      } else {
        gFindBar.close();
      }
      gFindBar.getElement("findbar-textbox").reset();
    }
    this.list = function() {
      var arr = this.history().slice(0, 10);
    //var arr = new Array(); arr.push("alpha", "beta", "gamma", "delta", "epsilon");
      this.ss = new Array();
      for (var i in arr) {
        this.ss.push({label:arr[i], oncommand:"document.popupNode.find('" + arr[i] + "')"});
      }
      if (arr.length == 0) this.ss.push({label:"empty", oncommand:""});
      this.ss.push({label:"", oncommand:""});
      this.find = function(item) {
        gFindBar.open();
        gFindBar.getElement("findbar-textbox").value = item;
        gFindBar.onFindAgainCommand(0);
      }
      this.mObj = custombuttons.getCbContextObj(this);
      this.mObj.setSub();
      var mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).
        setAttribute("oncommand", "event.stopPropagation()");
      for (var i in this.ss) {
        mItem = new this.mObj.getItem();
        mItem.label = this.ss[i].label;
        mItem.oncommand = this.ss[i].oncommand;
        this.mObj.insertBefore(mItem, this.mObj.oMenu.lastChild);
      }
    }
    this.history = function() {
      var file = Components.classes["@mozilla.org/file/directory_service;1"].
        getService(Components.interfaces.nsIProperties).
        get("ProfD", Components.interfaces.nsIFile);
      file.append("formhistory.sqlite");
      var dbService = Components.classes["@mozilla.org/storage/service;1"].
        getService(Components.interfaces.mozIStorageService);
      var db = dbService.openDatabase(file);
      var arr = new Array();
      try {
        var query = "SELECT value FROM moz_formhistory WHERE " +
          "fieldname = 'searchbar-history' or " +
          "fieldname = 'GBL-Search-History' ORDER BY firstUsed DESC";
        var statement = db.createStatement(query);
        while (statement.executeStep()) {
          arr.push(statement.getString(0));
        }
      } catch(e) {
        alert(e);
      } finally {
        statement.reset();
      }
      return arr;
    }
    this.setAttribute("onclick", "this.list(); custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/find-search-history.html');
    this.setAttribute("dependency", "FF 3.*, CB2 3.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  190. Findbar Toggle

    Code Tab

    this.toggleFind = function() {
      if(document.getElementById("FindToolbar").hasAttribute("hidden")) {
        document.getElementById("menu_find").click();
      }
      else {
        var cBtn=document.getElementById("FindToolbar");
        var nBtn=document.getAnonymousElementByAttribute(cBtn,"class","findbar-container");
        var fBtn=nBtn.firstChild;
        fBtn.click();
      }
    }
    this.toggleFind();

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080715.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/findbar-toggle.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Toggles%20the%20Findbar
  191. Firefox Search Sidebar

    Code Tab

    toggleSidebar('viewAdvancedSearchSidebar');

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080306.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/firefox-search-sidebar.html');      // Stores HomePage.
    this.setAttribute("dependency",'FF 2.0,CB 2.0.*,Firefox Search Sidebar');			// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    *******************************************************	
     L = Toggle the Firefox Search Sidebar	
     R = CB Context Menu
  192. FireFTP as dialog

    Code Tab

    /*Code*/
    openDialog("chrome://fireftp/content/fireftp.xul", "_blank", "chrome,dependent,resizable,dialog=no,titlebar", window);
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','xpi');
    this.setAttribute('version','20060817.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/fireftp-dialog-xpi.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  193. First Tab/Last Tab

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let Cb2s = cb2String;
    this.leftclick = function(evt) {
      var tabs = gBrowser.mTabs;
      for(var j = 0; j < tabs.length; j++) {
        if (tabs[j].getAttribute("first-tab") == "true") {
          gBrowser.selectedTab = gBrowser.mTabs[j]
        }
      }
    };
    this.rightclick = function(evt) {
      var tabs = gBrowser.mTabs;
      for(var j = 0; j < tabs.length; j++) {
        if (tabs[j].getAttribute("last-tab") == "true") {
          gBrowser.selectedTab = gBrowser.mTabs[j]
        }
      }
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080630.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/first-tablast-tab-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  194. FlashGot - ff+ tb

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ---------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      gFlashGot.switchOption('autoStart');
    };
    this.sleftclick = function(evt)
    {
      gFlashGot.switchOptions('includeImages');
    };
    this.midclick = function(evt)
    {
      gFlashGot.openOptionsDialog();
    };
    this.rightclick = function(evt)
    {
      gFlashGot.delayCmd('All');
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20081229');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/flashgot-thunderbird.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*, FlashGot');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    //this.tooltipText += ' L:Auto | SL:Images | M:Options | R:All';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    /*-------------------------- Tooltip Block Start -----------------------------*/
    let cr = "2";
      var build=window.navigator.userAgent;
      cr = (build.match("Firefox/3.") == null)?  cr : "3";  
    if (cr == "2"){ 
      this.tooltipText +=" L:Auto | SL:Images | M:Options | R:All ";
      }else{
      this.tooltipText += "\n L: Auto  M: Options   R: All \n Shift+L: Images  ";
    }
    /*-------------------------- Tooltip Block End -------------------------------*/

    Help Tab

    /*Help*/%0A%0AThis%20button%20works%20with%20the%20FlashGot%20extension.%0AIt%20is%20intended%20for%20Thunderbird%20but%20should%20work%20in%20Firefox%0Ahttps%3A//addons.mozilla.org/en-US/thunderbird/addon/220%0A%0A%20%20%20%20%20Left%3A%20%09Auto-start%0A%20%20%20%20%20Middle%3A%09Flashgot%20Options%0A%20%20%20%20%20Right%3A%20%09Download%20All%0A%20%20%20%20%20Shift%20+%20L%3A%20All%20Images%0A%20%20%20%20%20Shift%20+%20R%3A%20Context%20Menu%0A%0ADiscusssion%20%26%20Support%09http%3A//custombuttons2.com/forum/discussion-support/flashgot-for-thunderbird-t1084.html%0A%20%20%20%20%20%0A%20%20%20%20%20
  195. FlashGot- ff+tb

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ---------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      gFlashGot.switchOption('autoStart');
    };
    this.sleftclick = function(evt)
    {
      gFlashGot.switchOptions('includeImages');
    };
    this.midclick = function(evt)
    {
      gFlashGot.openOptionsDialog();
    };
    this.rightclick = function(evt)
    {
      gFlashGot.delayCmd('All');
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20081229');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/flashgot-thunderbird.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*, FlashGot');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    //this.tooltipText += ' L:Auto | SL:Images | M:Options | R:All';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    /*-------------------------- Tooltip Block Start -----------------------------*/
    let cr = "2";
      var build=window.navigator.userAgent;
      cr = (build.match("Firefox/3.") == null)?  cr : "3";  
    if (cr == "2"){ 
      this.tooltipText +=" L:Auto | SL:Images | M:Options | R:All ";
      }else{
      this.tooltipText += "\n L: Auto  M: Options   R: All \n Shift+L: Images  ";
    }
    /*-------------------------- Tooltip Block End -------------------------------*/

    Help Tab

    /*Help*/%0A%0AThis%20button%20works%20with%20the%20FlashGot%20extension.%0AIt%20is%20intended%20for%20Thunderbird%20but%20should%20work%20in%20Firefox%0Ahttps%3A//addons.mozilla.org/en-US/thunderbird/addon/220%0A%0A%20%20%20%20%20Left%3A%20%09Auto-start%0A%20%20%20%20%20Middle%3A%09Flashgot%20Options%0A%20%20%20%20%20Right%3A%20%09Download%20All%0A%20%20%20%20%20Shift%20+%20L%3A%20All%20Images%0A%20%20%20%20%20Shift%20+%20R%3A%20Context%20Menu%0A%0ADiscusssion%20%26%20Support%09http%3A//custombuttons2.com/forum/discussion-support/flashgot-for-thunderbird-t1084.html%0A%20%20%20%20%20
  196. Flock

    Code Tab

    /*CODE*/
    var page = gBrowser.currentURI;
    var browser = "/home/nicholas/flock/flock-browser";
    var file =  Components.classes["@mozilla.org/file/local;1"]
                          .createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath(browser);
    var process = Components.classes["@mozilla.org/process/util;1"]
                            .createInstance(Components.interfaces.nsIProcess);
    process.init(file);
    process.run(false, [page.spec], 1);
    return true;
    

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-buttons-linux.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button launches the current page in Flock
    It works on the linux operating system.
  197. Football

    Code Tab

    toggleSidebar("viewJogaSidebar");
    

    Initialization Tab

    if(typeof jogaMain != "object") {
      var ext = "Joga Companion";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.className += " chromeclass-toolbar-additional";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/joga-companion-sidebar.html');

    Help Tab

  198. Foreground-Image Swap with Background-Image Constant

    Code Tab

    /*Code*/

    Initialization Tab

    var star = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0BjL09LPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq0sjvKysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnr64Uo6yszJ+pqr6osrQaAAAAAAAAAAAAAAAAwbS3DtDFxs6imZjajIeEvI6KhhcAAAAAAAAAAAAAAAAAAAAAqLKyBq+5ucymsbLwtb/CxcvQ1KDT1tsUuKmwFLOkqqyll5r3jH9//YqBf9KOhoMaAAAAAAAAAAAAAAAAAAAAAAAAAADX4OK7usXI+rzFyfzZ3OHw5eHoyNvO1cfS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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AP///wD///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AP///wD///8A//////+sQf//rEH//6xB//+sQf//rEH//6xB//+sQf//rEH//6xB//+sQf/ArEH/wKxB/8CsQf/ArEH/wKxB/8CsQQ==";
    var grn = "data:image/x-ico;base64,AAABAAEAEBAAAAE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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgAD/QIAA/0CAAP9AgAD/QIAA/0CAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQIAA/0CAAP9AgAD/QIAA/0CAAP9AgAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAECAAP9AgAD/QIAA/0CAAP9AgAD/QIAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgAD/QIAA/0CAAP9AgAD/QIAA/0CAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQIAA/0CAAP9AgAD/QIAA/0CAAP9AgAD///+sQf//rEH//6xB//+sQf//rEH//6xB//+sQf//rEH//6xB//+sQf/ArEH/wKxB/8CsQf/ArEH/wKxB/8CsQQ==";
    var ximg = document.getAnonymousElementByAttribute(this, "class", "toolbarbutton-icon");
    ximg.setAttribute("style", 'background-image:url("'+star+'")!important;');
    this.leftclick = function(evt)
    {
      this.image = red;
    };
    this.midclick = function(evt)
    {
      this.image = yel;
    };
    this.rightclick = function(evt)
    {
      this.image = grn;
    };
    this.tooltipText = this.label + "\n" +
                      "\tL:\tRed\n" +
                      "\tM:\tYellow\n" +
                      "\tR:\tGreen";
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081206.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/foreground-image-swap-background-image-constant.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  199. Form filler

    Code Tab

    /*Code*/

    Initialization Tab

    var keys=new Array;
    keys.push(['title']); //Title
    keys.push(['fname','firstname','.fn']); //FirstName
    keys.push(['mname','middlename','.mn']); //MiddleName
    keys.push(['lname','lastname','.ln']); //LastName
    keys.push(['add','address']); //Address1
    keys.push(['add2','address2']); //Address2
    keys.push(['add2','address2']); //Address3
    keys.push(['pin','pincode','.pc']); //Zip Code
    keys.push(['city']); //City
    keys.push(['state']); //State
    keys.push(['.co','country']); //Country
    keys.push(['mail','.em']); //Email
    keys.push(['ph','phone']); //Phone
    keys.push(['ph','phone']); //Mobile Phone
    keys.push(['bday']); //Day of Birth
    keys.push(['month','bmon']); //Month of Birth
    keys.push(['year','byear']); //Year of Birth
    keys.push(['pwq','.pw_q','question']); //Security Question
    keys.push(['pwa','.pw_a','answer']); //Security Answer
    keys.push(['login','username','uname']); //UserName
    keys.push(['password','pass','.pw']); //Password
    var lov_keys=new Array;
    lov_keys.push(['sex','.sx']); //City
    lov_keys.push(['city']); //City
    lov_keys.push(['state']); //State
    //lov_keys.push(['.co','country']); //Country
    lov_keys.push(['bday']); //Day of Birth
    lov_keys.push(['month','bmon']); //Month of Birth
    lov_keys.push(['year','byear']); //Year of Birth
    lov_keys.push(['pwq','.pw_q','question']); //Security Question
    function form_fill(values,lov_values)
    {
       fill_textbox(values);
       fill_lov(lov_values)
    }
    function fill_textbox(values)
    {
       var obj= gBrowser.contentDocument.getElementsByTagName("INPUT");
       var textFields=new Array;
       for(var i=0;i<obj.length;i++)
       {
          if(obj[i].type!="hidden" && (obj[i].type=="password" || obj[i].type=="text"))
          {
             textFields.push(obj[i]);
          }
       }
       for( var i=0;i<textFields.length;i++)
       {
          cmp_key_value(textFields[i],values);
       }
    }
    function fill_lov(values)
    {
       var obj= gBrowser.contentDocument.getElementsByTagName("SELECT");
       var select=new Array;
       for(var i=0;i<obj.length;i++)
       {
          select.push(obj[i]);
       }
       for( var i=0;i<select.length;i++)
       {
          select_key_value(select[i],values);
       }
    }
    function cmp_key_value(obj,values)
    {
       var n=obj.name.toLowerCase();
       var id=obj.id.toLowerCase();
       for(var i=0;i<keys.length;i++)
       for(var j=0;j<keys[i].length;j++)
       {
          if(n.match(keys[i][j]) || id.match(keys[i][j]))
          {
             obj.value=values[i];
          }
       }
    }
    function select_key_value(obj,values)
    {
       var n=obj.name.toLowerCase();
       var id=obj.id.toLowerCase();
       for(var i=0;i<lov_keys.length;i++)
       for(var j=0;j<lov_keys[i].length;j++)
       {
          if(n.match(lov_keys[i][j]) || id.match(lov_keys[i][j]))
          {
             //alert(n+' : '+id);
             for(var k=0;k<obj.options.length;k++)
             {
                //alert(obj.options[k].value);
                for(var l=0;l<obj.options.length;l++)
                {
                   if(obj.options[k].value.toLowerCase().match(values[i][l]))
                   {
                      obj.selectedIndex=k;
                   }
                }
             }
          }
       }
    }
    this.onLeftClick=function()
    {
    var values=new Array;
    values.push("Mr"); //Title
    values.push("Rahul"); //FirstName
    values.push(""); //MiddleName
    values.push("Jain"); //LastName
    values.push("1-5-23/201 "); //Address1
    values.push("Narchimilli"); //Address2
    values.push("Begumpet"); //Address3
    values.push("500021"); //Zip Code
    values.push("Hyderabad"); //City
    values.push("AndhraPradesh"); //State
    values.push("India"); //Country
    values.push("username@yahoo.com"); //Email
    values.push("91-40-6666666"); //Phone
    values.push("91-9848098480"); //Mobile Phone
    values.push("14"); //Day of Birth
    values.push("1"); //Month of Birth
    values.push("1988"); //Year of Birth
    values.push("First Pet"); //Security Question
    values.push("V"); //Security Answer
    values.push("username"); //UserName
    values.push("password"); //Password
    var lov_values=new Array; //All small letters
    lov_values.push(['m','male']); //Gender
    lov_values.push(['hyd','hyderabad']); //City
    lov_values.push(['ap','andhrapradesh']); //State
    //lov_values.push(['in','india']); //Country
    lov_values.push(['14']); //Day of Birth
    lov_values.push(['1','jan','january']); //Month of Birth (month-1)
    lov_values.push(['1983']); //Year of Birth
    lov_values.push(['what is your first school name?','what was the name of your first school?']); //Security Question
    form_fill(values,lov_values);
    }
    this.onMiddleClick=function()
    {
    form_fill("uername","password");
    }
    this.onRightClick=function()
    {
    form_fill("username","password");
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
       if(evt.shiftKey) {
          this.showPopup(this);
          return;
       }
       switch(evt.button)
       {
          case 0:
             this.onLeftClick();
             break;
          case 1:
             this.onMiddleClick();
             break;
          case 2:
             this.onRightClick();
             break;
       }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = this.label; 
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/form-filler.html');

    Help Tab

  200. FriendFeed Bookmarklet

    Code Tab

    loadURI("javascript:void((function(){var e=content.document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('src','http://friendfeed.com/share/bookmarklet/javascript');content.document.body.appendChild(e)})())");

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/friendfeed-bookmarklet.html');

    Help Tab

  201. FTP Upload

    Code Tab

    //performancingUI.openFileUpload()
        var re = [];
        var ourURL = "";
        var theURL = [ourURL];
        window.openDialog("chrome://performancing/content/fileUpload.xul", "Peformancing File Insert", "chrome,dialog=0,modal=0,centerscreen", re, theURL);
        if (re[0]) {
            return theURL[0];
        }
        return false;

    Initialization Tab

    if(typeof performancingUI == "object") return;
    var ext = "Performancing";
    var err = ext + " extension is not installed or is disabled.";
    this.setAttribute("oncommand",
      "alert('" + err + "'); " +
      "this.disabled = true; " +
      "this.style.opacity = '.25';"
    );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/ftp-upload-button.html');

    Help Tab

  202. Full Screen

    Code Tab

    BrowserFullScreen();

    Initialization Tab

    this.tooltipText = "Full Screen (F11)"
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','2');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/full-screen.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  203. Function Viewer

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    let Cb2s = cb2String;
    let Cb = custombuttons;
    this.leftclick = function(evt)
    {
      this.viewFunction( true );
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.viewFunction = function() {
      var text = "Enter function name (case sensitive)\n" +
                 "For example: openUILink, gBrowser.loadOneTab    ";
      var objStr = "";
      bContinue = Cb.promptBox( "Function Viewer", text, objStr );
      if ( !bContinue[0] ) return;
      objStr = bContinue[1];
      try {
        if  (typeof eval(objStr) == "function") {
          var url = "data:application/x-javascript, " + encodeURIComponent(eval(objStr));
          if (content.location == "about:blank") {
            gBrowser.loadURI(url);
          } else {
            gBrowser.loadOneTab(url, null, null, null, false);
          }
        } else {
          alert(objStr + " is not a function.");
        }
      } catch(ex) {
        alert(objStr + " is not defined.");
      }
    }
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','LouCypher, SCClockDr - Update');
    this.setAttribute('version','20090210.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/functionobject-viewer-group.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    *********************************************************************
    Left - Prompts for a function name to display in a new data:application/x-javascript page
     ***** BEGIN LICENSE BLOCK *****
     Version: MPL 1.1/GPL 2.0/LGPL 2.1
       The contents of this file are subject to the Mozilla Public License Version
     1.1 (the "License"); you may not use this file except in compliance with
     the License. You may obtain a copy of the License at
     http://www.mozilla.org/MPL/
       Software distributed under the License is distributed on an "AS IS" basis,
     WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     for the specific language governing rights and limitations under the
     License.
       The Original Code is Function Viewer for Custom Buttons extension.
       The Initial Developer of the Original Code is LouCypher.
     Portions created by the Initial Developer are Copyright (C) 2007
     the Initial Developer. All Rights Reserved.
       Contributor(s):
     LouCypher <loucypher.moz@gmail.com>
       Alternatively, the contents of this file may be used under the terms of
     either the GNU General Public License Version 2 or later (the "GPL"), or
     the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     in which case the provisions of the GPL or the LGPL are applicable instead
     of those above. If you wish to allow use of your version of this file only
     under the terms of either the GPL or the LGPL, and not to allow others to
     use your version of this file under the terms of the MPL, indicate your
     decision by deleting the provisions above and replace them with the notice
     and other provisions required by the GPL or the LGPL. If you do not delete
     the provisions above, a recipient may use your version of this file under
     the terms of any one of the MPL, the GPL or the LGPL.
     ***** END LICENSE BLOCK *****
       Last updated:  2009-02-10 - SCClockDr
    
  204. Get Mail

    Code Tab

    /*Code*/
    goDoCommand("cmd_getMsgsForAuthAccounts");

    Initialization Tab

    /*Initialization code*/
    this.tooltipText = "Get new messages";
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/get-mail.html');
    this.setAttribute("dependency", "TB 3.*, CB2 3.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  205. Get Variables

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialisatiecode*/
    function OpenCustomLink(url){
    	  var newPage = getBrowser().loadURI(url);
              getBrowser().selectedTab = newPage;
      }
    var Msg = createMsg(this.label);
    /*----------------------- Custom Buttons² Muisaansturing -----------------------
    	Verwijder de onnodige functies in dit codeblok
    	of het gehele codeblok voor heel eenvoudige klikknoppen.
    		Vervang de functie-aanroep "Msg.aMsg('…')"
    		binnen elke benodigde klikfunctie door
    		de functie-aanroep van uw keuze.
    		Uw functie-aanroep zal dan worden uitgevoerd.
    		Toegang tot het click event Object (evt)
    		biedt u volledige controle.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      OpenCustomLink('javascript:(function(){var x,d,i,v,st; x=open(); d=x.document; d.open(); function hE(s){s=s.replace(/&/g,"&");s=s.replace(/>/g,">");s=s.replace(/</g,"<");return s;} d.write("<style>td{vertical-align:top; white-space:pre; } table,td,th { border: 1px solid #ccc; } div.er { color:red }</style><table border=1><thead><tr><th>Variable</th><th>Type</th><th>Value as string</th></tr></thead>"); for (i in window) { if (!(i in x) ) { v=window[i]; d.write("<tr><td>" + hE(i) + "</td><td>" + hE(typeof(window[i])) + "</td><td>"); if (v===null) d.write("null"); else if (v===undefined) d.write("undefined"); else try{st=v.toString(); if (st.length)d.write(hE(v.toString())); else d.write(" ")}catch(er){d.write("<div class=er>"+hE(er.toString())+"</div>")}; d.write("</pre></td></tr>"); } } d.write("</table>"); d.close(); })();');
    };
    this.sleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftLftClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.aleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltLftClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.cleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlLftClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.midclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysMdClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.smidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftMdClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.amidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltMdClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.cmidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlMdClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.rightclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Vervang dit door een aanroep van uw keuze
    };
    this.arightclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltRtClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.crightclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlRtClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Roept de algemene muisklikaansturing aan
    /*------------------- Custom Buttons² Muisaansturing einde -------------------*/
    /*---------------------------- Knopcodeblok Start ----------------------------*/
    /*---------------------------- Knopcodeblok Einde ----------------------------*/

    Help Tab

    Get variables in tab
  206. Get Variables

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialisatiecode*/
    function OpenCustomLink(url){
    	  var newPage = getBrowser().loadURI(url);
              getBrowser().selectedTab = newPage;
      }
    var Msg = createMsg(this.label);
    /*----------------------- Custom Buttons² Muisaansturing -----------------------
    	Verwijder de onnodige functies in dit codeblok
    	of het gehele codeblok voor heel eenvoudige klikknoppen.
    		Vervang de functie-aanroep "Msg.aMsg('…')"
    		binnen elke benodigde klikfunctie door
    		de functie-aanroep van uw keuze.
    		Uw functie-aanroep zal dan worden uitgevoerd.
    		Toegang tot het click event Object (evt)
    		biedt u volledige controle.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      OpenCustomLink('javascript:(function(){var x,d,i,v,st; x=open(); d=x.document; d.open(); function hE(s){s=s.replace(/&/g,"&");s=s.replace(/>/g,">");s=s.replace(/</g,"<");return s;} d.write("<style>td{vertical-align:top; white-space:pre; } table,td,th { border: 1px solid #ccc; } div.er { color:red }</style><table border=1><thead><tr><th>Variable</th><th>Type</th><th>Value as string</th></tr></thead>"); for (i in window) { if (!(i in x) ) { v=window[i]; d.write("<tr><td>" + hE(i) + "</td><td>" + hE(typeof(window[i])) + "</td><td>"); if (v===null) d.write("null"); else if (v===undefined) d.write("undefined"); else try{st=v.toString(); if (st.length)d.write(hE(v.toString())); else d.write(" ")}catch(er){d.write("<div class=er>"+hE(er.toString())+"</div>")}; d.write("</pre></td></tr>"); } } d.write("</table>"); d.close(); })();');
    };
    this.sleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftLftClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.aleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltLftClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.cleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlLftClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.midclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysMdClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.smidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftMdClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.amidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltMdClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.cmidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlMdClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.rightclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Vervang dit door een aanroep van uw keuze
    };
    this.arightclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltRtClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.crightclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlRtClick);  // Vervang dit door een aanroep van uw keuze
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Roept de algemene muisklikaansturing aan
    /*------------------- Custom Buttons² Muisaansturing einde -------------------*/
    /*---------------------------- Knopcodeblok Start ----------------------------*/
    /*---------------------------- Knopcodeblok Einde ----------------------------*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/show-variables-javascript.html');

    Help Tab

    Get variables in tab
  207. GetEmbedded

    Code Tab

    /*
    	GetEmbedded 0.2 (30. Oct. 2006)
    	- Download embedded files
    	- Drag and Drop links/files to download the target
    	Compatibility: FF 1.5.0.*, FF 2.0.0.*, Flock 0.7.*
    	Credits to Andrew Ruder for Download Embedded 
    	(http://www.aeruder.net/software/extensions/extensionlist.html)
    */
    this.getEmbedded();

    Initialization Tab

    var noEmbedded = "No embedded files were found.";
    this.tooltipText = "GetEmbedded";
    /*
    	NO NEED TO EDIT BELOW THIS LINE :-)
    */
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragenter","nsDragAndDrop.dragEnter(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.getEmbedded = function() {
    	var docs = this.getEmbeddedDocs(content, new Array());
    	var count = 0;
    	for(var j = 0; j < docs.length; j++) {
    		var embeds = docs[j].getElementsByTagName("embed");
    		for(var k = 0; k < embeds.length; k++) {
    			count++;
    			var url = makeURLAbsolute(docs[j].baseURI, embeds[k].src);
    			saveURL(url, "");
    		}
    	}
    	if (count == 0) {
    		alert(noEmbedded);
    	}
    }
    this.getEmbeddedDocs = function(frame, documentList) {
    	const framesList = frame.frames;
    	documentList.push(frame.document);
    	for(var i = 0; i < framesList.length; i++) {
    		this.getEmbeddedDocs(framesList[i], documentList);
    	}
    	return documentList;
    }
    this.setAttribute("author",'eXXile');								// Stores Author.
    this.setAttribute("version",'0.2');                                                 		// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/getembedded.html');		// Stores HomePage.
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

  208. GetEmbedded

    Code Tab

    /*
    	GetEmbedded 0.2 (30. Oct. 2006)
    	- Download embedded files
    	- Drag and Drop links/files to download the target
    	Compatibility: FF 1.5.0.*, FF 2.0.0.*, Flock 0.7.*
    	Credits to Andrew Ruder for Download Embedded 
    	(http://www.aeruder.net/software/extensions/extensionlist.html)
    */
    this.getEmbedded();

    Initialization Tab

    var noEmbedded = "No embedded files were found.";
    this.tooltipText = "GetEmbedded";
    /*
    	NO NEED TO EDIT BELOW THIS LINE :-)
    */
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragenter","nsDragAndDrop.dragEnter(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.getEmbedded = function() {
    	var docs = this.getEmbeddedDocs(content, new Array());
    	var count = 0;
    	for(var j = 0; j < docs.length; j++) {
    		var embeds = docs[j].getElementsByTagName("embed");
    		for(var k = 0; k < embeds.length; k++) {
    			count++;
    			var url = makeURLAbsolute(docs[j].baseURI, embeds[k].src);
    			saveURL(url, "");
    		}
    	}
    	if (count == 0) {
    		alert(noEmbedded);
    	}
    }
    this.getEmbeddedDocs = function(frame, documentList) {
    	const framesList = frame.frames;
    	documentList.push(frame.document);
    	for(var i = 0; i < framesList.length; i++) {
    		this.getEmbeddedDocs(framesList[i], documentList);
    	}
    	return documentList;
    }
    this.setAttribute("author",'eXXile');								// Stores Author.
    this.setAttribute("version",'0.2');                                                 		// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/getembedded.html');		// Stores HomePage.
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

  209. GetFile

    Code Tab

    /*
    	GetFile 0.2 (30. Oct. 2006)
    	- Download a file just by copying its URL and clicking on the button
    	- Manually enter a downloadable URL
    	- Drag and Drop links/files to download the target
    	Compatibility: FF 1.5.0.*, FF 2.0.0.*, Flock 0.7.*
    */
    this.getFile();

    Initialization Tab

    var promptLabel = "Enter a valid and downloadable URL...";
    var warningLabel = "There is no valid and downloadable URL.";
    this.tooltipText = "GetFile";
    /*
    	NO NEED TO EDIT BELOW THIS LINE :-)
    */
    var mPopup = document.createElement("menupopup");
    mPopup.setAttribute("onpopupshowing", "return this.parentNode.showDropDown(event);");
    mPopup.setAttribute("oncommand", "this.parentNode.getFile(event); event.stopPropagation();");
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragenter","nsDragAndDrop.dragEnter(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.getFile = function(aUrl) {
    	var clipboard = this.getClipboard();
    	var promptVal = "";
    	if(this.isURL(clipboard)) promptVal = clipboard;
    	var dwnUrl = (aUrl == "prompt") ? prompt(promptLabel, promptVal) : clipboard;
    	if(dwnUrl == null) return false;
    	if(this.isURL(dwnUrl)) openUILinkIn(dwnUrl, "save");
    	else alert(warningLabel);
    }
    this.showDropDown = function(e) {
    	// remove any existing entries
    	while(mPopup.hasChildNodes()) {
    		mPopup.removeChild(mPopup.firstChild); 
    	}
    	var clipboard = this.getClipboard();
    	var promptVal = "";
    	if(this.isURL(clipboard)) {
    		promptVal = clipboard;
    		var dwnItem = document.createElement("menuitem");
    		dwnItem.setAttribute('label', clipboard);
    		dwnItem.setAttribute('tooltiptext', clipboard);
    		dwnItem.setAttribute('oncommand', "this.parentNode.parentNode.getFile(); event.stopPropagation();");
    		dwnItem.setAttribute('style', 'font-weight: bold;');
    		mPopup.appendChild(dwnItem);
    	}
    	var textItem = document.createElement("menuitem");
    	textItem.setAttribute('label', promptLabel);
    	textItem.setAttribute('tooltiptext', promptLabel);
    	textItem.setAttribute('oncommand', "this.parentNode.parentNode.getFile('prompt'); event.stopPropagation();");
    	mPopup.appendChild(textItem);
    }
    this.getClipboard = function() {
    	var clip = Components.classes["@mozilla.org/widget/clipboard;1"].getService(Components.interfaces.nsIClipboard);
    	if(!clip) return false; 
    	var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
    	if(!trans) return false;
    	trans.addDataFlavor("text/unicode");
    	clip.getData(trans, clip.kGlobalClipboard);
    	var str = new Object();
    	var strLength = new Object();
    	trans.getTransferData("text/unicode", str, strLength);
    	if(str) str = str.value.QueryInterface(Components.interfaces.nsISupportsString);
    	if(str) clipboard = str.data.substring(0, strLength.value / 2);
    	return clipboard;
    }
    this.isURL = function(s) { 
    	var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/ 
    	return regexp.test(s);
    }
    this.setAttribute("author",'eXXile');								// Stores Author.
    this.setAttribute("version",'0.2');                                                 		// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/getfile.html');		// Stores HomePage.
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.3E

    Help Tab

  210. GetFile

    Code Tab

    /*
    	GetFile 0.2 (30. Oct. 2006)
    	- Download a file just by copying its URL and clicking on the button
    	- Manually enter a downloadable URL
    	- Drag and Drop links/files to download the target
    	Compatibility: FF 1.5.0.*, FF 2.0.0.*, Flock 0.7.*
    */
    this.getFile();

    Initialization Tab

    var promptLabel = "Enter a valid and downloadable URL...";
    var warningLabel = "There is no valid and downloadable URL.";
    this.tooltipText = "GetFile";
    /*
    	NO NEED TO EDIT BELOW THIS LINE :-)
    */
    var mPopup = document.createElement("menupopup");
    mPopup.setAttribute("onpopupshowing", "return this.parentNode.showDropDown(event);");
    mPopup.setAttribute("oncommand", "this.parentNode.getFile(event); event.stopPropagation();");
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragenter","nsDragAndDrop.dragEnter(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.getFile = function(aUrl) {
    	var clipboard = this.getClipboard();
    	var promptVal = "";
    	if(this.isURL(clipboard)) promptVal = clipboard;
    	var dwnUrl = (aUrl == "prompt") ? prompt(promptLabel, promptVal) : clipboard;
    	if(dwnUrl == null) return false;
    	if(this.isURL(dwnUrl)) openUILinkIn(dwnUrl, "save");
    	else alert(warningLabel);
    }
    this.showDropDown = function(e) {
    	// remove any existing entries
    	while(mPopup.hasChildNodes()) {
    		mPopup.removeChild(mPopup.firstChild); 
    	}
    	var clipboard = this.getClipboard();
    	var promptVal = "";
    	if(this.isURL(clipboard)) {
    		promptVal = clipboard;
    		var dwnItem = document.createElement("menuitem");
    		dwnItem.setAttribute('label', clipboard);
    		dwnItem.setAttribute('tooltiptext', clipboard);
    		dwnItem.setAttribute('oncommand', "this.parentNode.parentNode.getFile(); event.stopPropagation();");
    		dwnItem.setAttribute('style', 'font-weight: bold;');
    		mPopup.appendChild(dwnItem);
    	}
    	var textItem = document.createElement("menuitem");
    	textItem.setAttribute('label', promptLabel);
    	textItem.setAttribute('tooltiptext', promptLabel);
    	textItem.setAttribute('oncommand', "this.parentNode.parentNode.getFile('prompt'); event.stopPropagation();");
    	mPopup.appendChild(textItem);
    }
    this.getClipboard = function() {
    	var clip = Components.classes["@mozilla.org/widget/clipboard;1"].getService(Components.interfaces.nsIClipboard);
    	if(!clip) return false; 
    	var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
    	if(!trans) return false;
    	trans.addDataFlavor("text/unicode");
    	clip.getData(trans, clip.kGlobalClipboard);
    	var str = new Object();
    	var strLength = new Object();
    	trans.getTransferData("text/unicode", str, strLength);
    	if(str) str = str.value.QueryInterface(Components.interfaces.nsISupportsString);
    	if(str) clipboard = str.data.substring(0, strLength.value / 2);
    	return clipboard;
    }
    this.isURL = function(s) { 
    	var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/ 
    	return regexp.test(s);
    }
    this.setAttribute("author",'eXXile');								// Stores Author.
    this.setAttribute("version",'0.2');                                                 		// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/getfile.html');		// Stores HomePage.
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.3E

    Help Tab

  211. Gladder

    Code Tab

    /*Code*/

    Initialization Tab

    if(!document.getElementById("gl-status-proxythis")) {
      var ext = "Gladder";
      var err = "The " + ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.pref='gladder.enabled';
    var on = false;
    var off = true;
    var imgOff = '\
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK\
    /INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJXSURBVHjajFPPaxNBFH\
    4zu5uEtKmp2SZKPehFPYhWTD14qIJFxQgePXgQ8eCPgjdBivijiAcvvQgtiseUehHBCto/QC/+BQoekm\
    qTzW7bbONu0mTn+Wazu90eRB98zMybed+879tZhogqAOiEfYRhQpewSqgF892EvYRssP5FWCE4BGBEME\
    pjnjA6M735vu0gNAyEVwu7DgRFBULu2cNW2d4QUK0IKL/LjlAOCVvy9j3yACFjNxE2bYRWS+75+f3Bnu\
    YScb2GIMegUxlNdaP84ANLDXCuJfmP79ehURfgugjjh8wvOZ1DeoCBqgF02gA/q15QB3PW3M0jwjZB9d\
    alJAagqCAE+MUykAazQYlGv0JRIB6u16gACI8IiIUnUsDSQ35RGF+/6UvG43Pj4frS4kJhB4XodyNN/B\
    SkEpfPrp8J2ySCMC8TiYsTa5NGTYR7H4M8qtbLqWPM63FEwTl/Dhrp7dLHsubvjClDORUY59DrQDZ7H0\
    IC68WN4+J3E9C1QUXHBqQDUoLfEmf+F7owO1OIm9h2t/V5ZjWaq8Jp+h6Exm11/svEKKQHyzRySXb7mn\
    26vtr34O3y8FL83MnDZkmIbYOjDtZe3z3K1CRnWopI7sXJuTl79QRLDjKezjA9Px15IAmNp6Ui9LrkQY\
    vMkLJJKNkVmShV8IyustQgZ+iRiTxOgLLY78BrGkA3kHkarlQ8kBJ6PYDiQbOkjzzqm0gP3nHEXz2Qeu\
    Q/oUyMWZOOg/Cv2OGB8eR8kSkaddlFPb8YHZo/daUeL7r1+U30EuMv9I8AAwDDNgza+B9GbwAAAABJRU\
    5ErkJggg==';
    var imgOn = '\
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK\
    /INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGLSURBVHjapFM7SwNBEJ\
    7NrRELCxWChZWtikX8C1b+BC0FxYCt2BgL+1QStBH0Jwhi/AmindqJEhAu74f3TG53nA17yRnvQMjAx9\
    7ONzePb+4YIsIkxihBhs4pfV8mCI13AicYCZyq3FMJ1ukhrYOWlFOjTJiJJI9yn9rXYa2bYxMYo7wBIE\
    H6NoX4sHB49dq+PlqBFDUgxTj30ijurcpuHbhofoF0bUBFShEdzwkqH4MXseeOc66olQc+LigLBP1Yga\
    TdTlZPJ1Qa3NM5noFpASGBM7SYyOrFfROtFlVrQSZfem4UdrKQJu1YikL6IJ0OoPsNmdOHEYeS4pW/Cx\
    wpQFrNYWPSIz3IB33/T9NxHFcVojYQM8HiOKVBKZyHMKsqadgxc4fciGhc5kxUW6B1GXOLBvouILU6f3\
    DxWC9sZxmfHnVAfqn0OLl7qp5tbajtcbTaID2L2nPoe2K/ZkbPocG7cXpguHouOtWhN6iVxX/1iGpwO9\
    HfWMlvmuGFdv3WPN9di+smifsRYAANyASJUrEsJwAAAABJRU5ErkJggg==';
    this.setState=function(){
      var state=this.PS.getBoolPref(this.pref);
      var imgStat = document.getElementById("gladderStatusImage");
      imgStat = imgStat.getAttribute("src");
      var imgStat = document.getElementById("gladderStatusImage");
      imgStat = imgStat.getAttribute("src");
      if (state==on) {
        this.setAttribute("tooltiptext","Auto-redirecting turned OFF");
        this.image = imgOn;
      }
      else {
        this.setAttribute("tooltiptext","Auto-redirecting turned ON");
        this.image = imgOff;
      }
    }
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    var test = document.getElementById("cbContext-gladder");
    if(test) test.parentNode.removeChild(test);
    var subPopup, subMenu, mPopup;
    subPopup = document.createElement("menupopup");
    subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.appendChild(subPopup);
    mPopup = document.createElement("popup");
    mPopup.id = "cbContext-gladder";
    var mID = ["gl-status-popup"];
    for(var i = 0; i < mID.length; i++)
      copyMenuItems(mPopup, mID[i], true);
    copyMenuItems(subPopup, "custombuttons-contextpopup");
    mPopup.appendChild(subMenu);
    document.getElementById("mainPopupSet").appendChild(mPopup);
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute("context", mPopup.id);
    this.setAttribute("onclick", "gGladder.clickStatus(event); this.setState();");
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080715.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/gladder-button.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Toggles Gladder's option for
    Auto-redirecting between ON and OFF
    Additionally duplicates some of the Gladder
    context menu in the button's context
    L: Toggle Auto-redirect
    R: Gladder Context Menu with Custom Button context in submenu
  212. Gmail Compose

    Code Tab

    /*=======================================================================
    	Compose Email via multiple Gmail Accounts
    	Based on LouCypher's Shorten URL & Gmail Buttons
    	Add any number of GMail accounts to the button
    	Context menu contains a list of your accounts
    	Clicking directly on the button opens the composer
    	in a new unfocused tab
    	Middle-Clicking directly on the button opens
    	the chosen gmail account
    	You can make the button execute whenever selecting
    	a different account by uncommenting a section of marked code
    	If a password is provided within the button then
    	you will bypass the prompt for a password.
    =======================================================================*/
    var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
    this.gmCompClick(index);

    Initialization Tab

    this.ss = [
    //====================================================================
    //
    //   FIRST, IT IS VERY IMPORTANT THAT YOU USE 'LINE 10' IN THE EDIT SECTION
    //   USE THIS LINE AS EITHER YOUR ONLY ACCOUNT IF YOU HAVE ONLY ONE
    //   OR AS YOUR LAST ACCOUNT IF YOU HAVE MULTIPLE
    //
    //   Un-comment (remove "//" from the *beginning* of the line)
    //   to populate the menu with your chosen number of gmail accounts.
    //   i.e. 4 accounts = un-comment lines 1, 2, 3 & 10
    //
    //      *NOTE: "Line 10" is already un-commented for you
    //
    //   The double-quotes should be filled as follows:
    //     *label with how you would like the account to be displayed in the menu
    //     *username with your gmail username
    //     *password, this is optional (if you don't put one in, then you will be prompted for one)
    //   
    //====================================================================
    //====================EDIT THIS SECTION===============================
    //  { label: "", username: "", password: "" },  // LINE 1
    //  { label: "", username: "", password: "" },  // LINE 2
    //  { label: "", username: "", password: "" },  // LINE 3
    //  { label: "", username: "", password: "" },  // LINE 4
    //  { label: "", username: "", password: "" },  // LINE 5
    //  { label: "", username: "", password: "" },  // LINE 6
    //  { label: "", username: "", password: "" },  // LINE 7
    //  { label: "", username: "", password: "" },  // LINE 8
    //  { label: "", username: "", password: "" },  // LINE 9
      { label: "", username: "", password: "" }  // LINE 10
    //====================END EDITABLE SECTION===============================
    ]
    //==========BEGIN DRAG & DROP FUNCTIONS=======================
      this.getSupportedFlavours = function () {
        var flavours = new FlavourSet();
        flavours.appendFlavour("text/unicode");
        return flavours;
      }
      this.onDragOver = function(e,f,s){}
      this.onDrop = function(event,dDat,session){
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
        this.gmComp(event,dDat,session,index); 
      }
    //==========END DRAG & DROP FUNCTIONS=======================
    //=============PROMPT FOR USERNAME & PASSWORD==================
      this.usrnmP = function(aIndex, aSelect) {
        var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                                .getService(Components.interfaces.nsIPromptService);
        username = {value:""};
        password = {value:""};
        check = {value:false};
        okorcancel = prompts.promptUsernameAndPassword(window, 'Username & Password', 'Please input the Following...\n', username, password, '', check);
      }
    //==========PROMPT FOR PASSWORD ONLY=========================
      this.pswrdP = function(aIndex, aSelect) {
        var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                            .getService(Components.interfaces.nsIPromptService);
        input = {value:""};
        check = {value:false};
        okorcancel = prompts.promptPassword(window, 'Password', 'Please input your Password for '+ this.ss[aIndex].username + '@gmail.com', input, '', check);
      }
    //==============BEGIN MIDDLE-CLICK GMAIL INBOX FUNCTION=================
    this.gMail = function(aIndex, aSelect) {
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
        this.go = function(aIndex, aSelect) {
          gBrowser.addTab(
            "https://www.google.com/accounts/ServiceLoginAuth?" +
            "service=mail&continue=https://gmail.google.com/gmail" +
            "&Email=" + userName +
            "&Passwd=" + passWord +
            "&PersistentCookie=no", null, null, null, !aSelect
          );
        return;
        }
      //========IF THERE IS NO USERNAME SPECIFIED===========
      if (this.ss[aIndex].username == "") {
        this.usrnmP(index);
        if (username.value == "" || password.value == "" || !username.value || !password.value) return;
        else {
          var userName=username.value;
          var passWord=password.value;
          this.go(index);
          return;
        }
      }
      //========IF THERE IS NO PASSWORD SPECIFIED===========
      else if (this.ss[aIndex].password == "") {
        this.pswrdP(index);
        if (input.value == "" || !input.value) return;
        else {
          var userName=this.ss[aIndex].username;
          var passWord=input.value;
          this.go(index);
          return;
        }
      }
      //========IF BOTH USERNAME & PASSWORD ARE SPECIFIED===========
      else {
        var userName=this.ss[aIndex].username;
        var passWord=this.ss[aIndex].password;
        this.go(index);
        return;
      }
    }
    //==============END MIDDLE-CLICK GMAIL INBOX FUNCTION=================
    //==============BEGIN LEFT-CLICK GMAIL COMPOSE FUNCTION=================
    this.gmCompClick = function(aIndex, aSelect) {
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
        this.go = function(aIndex, aSelect) {
          gBrowser.addTab(
          "https://www.google.com/accounts/ServiceLoginAuth?" +
          "&service=mail&rm=false&ltmpl=wsad&continue=https://mail.google.com/mail" +
          "?view=cm&fs=1" +
          "&Email=" + userName +
          "&Passwd=" + passWord +
          "&PersistentCookie=no", null, null, null, !aSelect
          );
        return;
        }
      //========IF THERE IS NO USERNAME SPECIFIED===========
      if (this.ss[aIndex].username == "") {
        this.usrnmP(index);
        if (username.value == "" || password.value == "" || !username.value || !password.value) return;
        else {
          var userName=username.value;
          var passWord=password.value;
          this.go(index);
          return;
        }
      }
      //========IF THERE IS NO PASSWORD SPECIFIED===========
      else if (this.ss[aIndex].password == "") {
        this.pswrdP(index);
        if (input.value == "" || !input.value) return;
        else {
          var userName=this.ss[aIndex].username;
          var passWord=input.value;
        this.go(index);
        return;
        }
      }
      //========IF BOTH USERNAME & PASSWORD ARE SPECIFIED===========
      else {
        var userName=this.ss[aIndex].username;
        var passWord=this.ss[aIndex].password;
        this.go(index);
        return;
      }
    }
    //==============END LEFT-CLICK GMAIL COMPOSE FUNCTION=================
    //==============BEGIN DRAG&DROP GMAIL COMPOSE FUNCTION=================
    this.gmComp = function(event, dDat, session, aIndex, aSelect) {
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
    //=======DETERMINES HOW TO INTERPRET THE DRAGGED TEXT=============
        var prs=unescape(dDat.data);
        var str=escape(prs); //escapes the string, replacing special characters and spaces
        var indA=str.indexOf("mailto:"); //finds beginning of link
        var indB=str.indexOf("
    "); //finds first occurrence of linebreak
        var str0=str.slice(indA+9,indB); //removes beginning mailto & anything after linebreak from string
        var ind4=str0.indexOf("?"); //finds location of the first occurrance of ?
        var ind5=str0.indexOf("@"); //finds location of the first occurrance of @
        var res1=str0.substring(0,ind4);  //email
    //=======PARSES THE STRING, DELIVERS CORRECT DRAGGED EMAIL & LOADS THE URL=======
      this.go = function(event,dDat,session,index) {
        if(str.match("mailto:") && ind4>0) var eMail=res1;
        else if(str.match("mailto:") && ind4<1) var eMail=str0;
        else var eMail=prs;
          gBrowser.addTab(
          "https://www.google.com/accounts/ServiceLoginAuth?" +
          "&service=mail&rm=false&ltmpl=wsad&continue=https://mail.google.com/mail" +
          "?view=cm&fs=1" +
          "&to=" + eMail +
          "&Email=" + userName +
          "&Passwd=" + passWord +
          "&PersistentCookie=no", null, null, null, !aSelect
          );
        return;
      }
    //========IF THERE IS NO USERNAME SPECIFIED===========
      if (this.ss[aIndex].username == "") {
        this.usrnmP(index);
        if (username.value == "" || password.value == "" || !username.value || !password.value) return;
          var userName=username.value;
          var passWord=password.value;
          this.go(index);
          return;
      }
    //========IF THERE IS NO PASSWORD SPECIFIED===========
      else if (this.ss[aIndex].password == "") {
        this.pswrdP(index);
        if (input.value == "" || !input.value) return;
          var userName=this.ss[aIndex].username;
          var passWord=input.value;
          this.go(index);
          return;
      }
    //========IF BOTH USERNAME & PASSWORD ARE SPECIFIED===========
      else {
        var userName=this.ss[aIndex].username;
        var passWord=this.ss[aIndex].password;
          this.go(index);
          return;
      }
    }
    //==============END DRAG&DROP GMAIL COMPOSE FUNCTION=================
    //===========DETERMINES WHICH ACCOUNT IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function(aNode) {
      var prefstring = "custombuttons.gmailCompose.index";
      try {
        var ssIdx = gPrefService.getIntPref(prefstring);
      } catch(ex) {
        var ssIdx = 0;
        gPrefService.setIntPref(prefstring, ssIdx);
      }
      for(var i = 0; i < aNode.childNodes.length; i++) {
        aNode.childNodes[i].removeAttribute("checked");
      }
      aNode.childNodes[ssIdx].setAttribute("checked", true);
    }
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      var prefstring = "custombuttons.gmailCompose.index";
      gPrefService.setIntPref(prefstring, aNode.getAttribute("index"));
      aNode.checked = true;
      //uncomment the following 2 lines to execute gmailCompose after selecting a username
      //var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
      //this.gmCompClick(index);
    }
    //========ADDS THE ACCOUNTS TO THE CONTEXT MENU==============
    function addMenuItem(aNode, aObject, aIndex, aLabel, aUsername, aPassword) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("oncommand", "document.popupNode.setIndex(this)");
      mi.setAttribute("index", aIndex);
      mi.setAttribute("label", aLabel);
      mi.setAttribute("username", aUsername);
      mi.setAttribute("password", aPassword);
      mi.setAttribute("type", "checkbox");
      mi.setAttribute("group", "gmailCompose");
      mi.setAttribute("autoCheck", false);
    }
    //========MOVES THE CB CONTEXT MENU TO A SUBMENU=============
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
      var m = aNode.appendChild(document.createElement("menu"));
      m.setAttribute("label", "Custom Button");
      var mp = m.appendChild(document.createElement("menupopup"));
      copyMenuItems(mp, "custombuttons-contextpopup");
      aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    const popupID = "cbContext-gmailCompose";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.getIndex(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    for(var i = 0; i < this.ss.length; i++) {
      addMenuItem(pop, this, i, this.ss[i].label, this.ss[i].username, this.ss[i].password);
    }
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
      if (this.ss[aIndex].username) {this.tooltipText = this.ss[aIndex].username + '@gmail.com';}
      else {this.tooltipText = 'Gmail Compose';}
    }
    //=======END TOOLTIP FUNCTION=======================================
    cloneCBContext(pop);
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "var index = gPrefService.getIntPref(\"custombuttons.gmailCompose.index\"); this.toolTip(index); this.style.opacity = \'.99\';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    this.setAttribute("onclick", "if(event.button == 1) var index = gPrefService.getIntPref(\"custombuttons.gmailCompose.index\"); this.gMail(index);");
    this.setAttribute("context", popupID);
    this.setAttribute("author",'m435tr0d');								// Stores Author.
    this.setAttribute("version",'20070413.00a');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/gmail-compose.html');	        // Stores HomePage.
    this.setAttribute("dependency",'userChrome,FF 2.0,CB 0.0.2a');					// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute("help",'0,=================== Left-Click ====================\n\n    ==Accounts Hardcoded==\n\n    Opens the currently selected account\'s GMail Compose tab\n\n    ==Nothing Hardcoded==\n\n    Prompts for username and/or password\n    and opens the inserted account\'s compose tab\n\n================== Middle-Click ===================\n\n    Opens the currently selected account\'s GMail Inbox\n\n=================== Right-Click ===================\n\n    Context Menu with hardcoded accounts\n    and submenu for CB Context\n \n ');

    Help Tab

    =================== Left-Click ====================
        ==Accounts Hardcoded==
        Opens the currently selected account's GMail Compose tab
        ==Nothing Hardcoded==
        Prompts for username and/or password
        and opens the inserted account's compose tab
    ================== Middle-Click ===================
        Opens the currently selected account's GMail Inbox
    =================== Right-Click ===================
        Context Menu with hardcoded accounts
        and submenu for CB Context
     
  213. Gmail Compose - supports Google Apps

    Code Tab

    /*Code*/
    /*=======================================================================
    	Compose Email via multiple Gmail and/or Google domain Accounts
    	Based on LouCypher's Shorten URL & Gmail Buttons
    	Add any number of GMail accounts to the button
    	Context menu contains a list of your accounts
    	Clicking directly on the button opens the composer
    	in a new unfocused tab
    	Middle-Clicking directly on the button opens
    	the chosen gmail account
    	If a password is provided within the button then
    	you will bypass the prompt for a password.
    =======================================================================*/
    

    Initialization Tab

    /*Initialization code*/
    this.ss = [
    //====================================================================
    //
    //   FIRST, IT IS VERY IMPORTANT THAT YOU USE 'LINE 10' IN THE EDIT SECTION
    //   USE THIS LINE AS EITHER YOUR ONLY ACCOUNT IF YOU HAVE ONLY ONE
    //   OR AS YOUR LAST ACCOUNT IF YOU HAVE MULTIPLE
    //
    //   Un-comment (remove "//" from the *beginning* of the line)
    //   to populate the menu with your chosen number of gmail accounts.
    //   i.e. 4 accounts = un-comment lines 1, 2, 3 & 10
    //
    //      *NOTE: "Line 10" is already un-commented for you
    //
    //   The double-quotes should be filled as follows:
    //     *label with how you would like the account to be displayed in the menu
    //     *username with your gmail username
    //     *password, this is optional (if you don't put one in, then you will be prompted for one)
    //   
    //   The domain field should be left blank if the email addres is a GMail account
    //     *only add a domain if you are using Google Domain
    //     *if using google domain, insert the correct domain 
    //      examples: phpbbnow.com, google.com, or mozillazine.org
    //   
    //====================================================================
    //====================EDIT THIS SECTION===============================
    //  { label: "", username: "", password: "", domain: "" },  //LINE 1
    //  { label: "", username: "", password: "", domain: "" },  //LINE 2
    //  { label: "", username: "", password: "", domain: "" },  //LINE 3
    //  { label: "", username: "", password: "", domain: "" },  //LINE 4
    //  { label: "", username: "", password: "", domain: "" },  //LINE 5
    //  { label: "", username: "", password: "", domain: "" },  //LINE 6
    //  { label: "", username: "", password: "", domain: "" },  //LINE 7
    //  { label: "", username: "", password: "", domain: "" },  //LINE 8
    //  { label: "", username: "", password: "", domain: "" },  //LINE 9
      { label: "", username: "", password: "", domain: "" }     //LINE 10
    //====================END EDITABLE SECTION===============================
    ]
    //==========BEGIN DRAG & DROP FUNCTIONS=======================
      this.getSupportedFlavours = function () {
        var flavours = new FlavourSet();
        flavours.appendFlavour("text/unicode");
        return flavours;
      }
      this.onDragOver = function(e,f,s){}
      this.onDrop = function(event,dDat,session){
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
        this.gmComp(event,dDat,session,index); 
      }
    //==========END DRAG & DROP FUNCTIONS=======================
    //=============PROMPT FOR USERNAME & PASSWORD==================
      this.usrnmP = function(aIndex, aSelect) {
        if (this.ss[aIndex].domain == "") {
        var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                                .getService(Components.interfaces.nsIPromptService);
        username = {value:""};
        password = {value:""};
        check = {value:false};
        okorcancel = prompts.promptUsernameAndPassword(window, 'Username & Password', 'Please input the Following...\n', username, password, 'Check here if this is a google domain account', check);
        }
        else {
        var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                                .getService(Components.interfaces.nsIPromptService);
        username = {value:""};
        password = {value:""};
        check = {value:false};
        okorcancel = prompts.promptUsernameAndPassword(window, 'Username & Password', 'Please input the Following info for your account \non '+this.ss[aIndex].domain+'\n', username, password, null, check);
        }
      }
    //==========PROMPT FOR PASSWORD ONLY=========================
      this.pswrdP = function(aIndex, aSelect) {
        if (this.ss[aIndex].domain == "") {
        var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                            .getService(Components.interfaces.nsIPromptService);
        input = {value:""};
        check = {value:false};
        okorcancel = prompts.promptPassword(window, 'Password', 'Please input your Password for '+ this.ss[aIndex].username+ '@gmail.com', input, null, check);
        }
        else {
        var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                            .getService(Components.interfaces.nsIPromptService);
        input = {value:""};
        check = {value:false};
        okorcancel = prompts.promptPassword(window, 'Password', 'Please input your Password for '+ this.ss[aIndex].username + '@'+this.ss[aIndex].domain+'\n', input, null, check);
        }
      }
    //==============BEGIN MIDDLE-CLICK GMAIL INBOX FUNCTION=================
    this.gMail = function(aIndex, aSelect) {
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
        this.go = function(aIndex, aSelect) {
          if (doMain == "" || doMain == null || doMain == undefined) {
          gBrowser.selectedTab = gBrowser.addTab(
            "https://www.google.com/accounts/ServiceLoginAuth?" +
            "service=mail&continue=https://gmail.google.com/gmail" +
            "&Email=" + userName +
            "&Passwd=" + passWord +
            "&PersistentCookie=no", null, null, null, !aSelect
          );
        return;
          }
          else {
          function goTo() {
            gBrowser.selectedTab = gBrowser.addTab(
              "https://www.google.com/a/" +
              doMain +
              "/ServiceLogin?service=mail&passive=true&nui=1&continue=https://mail.google.com/a/" +
              doMain, null, null, null
            );
          }
          goTo();
          function submitForm() {
            var name=content.document.forms[0].elements[3];
            var pass=content.document.forms[0].elements[4];
            name.value=userName;
            pass.value=passWord;
            content.document.forms[0].submit();
          }
          window.setTimeout(submitForm,1500);
          submitForm();
          }
        }
      //========IF THERE IS NO USERNAME SPECIFIED===========
      if (this.ss[aIndex].username == "") {
        this.usrnmP(index);
        if (username.value == "" || password.value == "" || !username.value || !password.value) return;
        else if (!this.ss[aIndex].domain == "" && !check.value) {
            var domain=this.ss[aIndex].domain;
        }
        else if (check.value) {
    	var domain, uri;
    	domain = prompt('Insert your domain for your Google Domain account\ni.e. - phpbbnow.com, google.com, or mozillazine.org','','Google Domain');
        }
          var doMain=domain;
          var userName=username.value;
          var passWord=password.value;
          this.go(index);
          return;
      }
      //========IF THERE IS NO PASSWORD SPECIFIED===========
      else if (this.ss[aIndex].password == "") {
        this.pswrdP(index);
        if (input.value == "" || !input.value) return;
        else if (!this.ss[aIndex].domain == "") {
            var domain=this.ss[aIndex].domain;
        }
        else if (check.value) {
    	var domain, uri;
    	domain = prompt('Insert your domain for your Google Domain account\ni.e. - phpbbnow.com, google.com, or mozillazine.org','','Google Domain');
        }
          var doMain=domain;
          var userName=this.ss[aIndex].username;
          var passWord=input.value;
          this.go(index);
          return;
      }
      //========IF BOTH USERNAME & PASSWORD ARE SPECIFIED===========
      else {
        var userName=this.ss[aIndex].username;
        var passWord=this.ss[aIndex].password;
        var doMain=this.ss[aIndex].domain;
        this.go(index);
        return;
      }
    }
    //==============END MIDDLE-CLICK GMAIL INBOX FUNCTION=================
    //==============BEGIN LEFT-CLICK GMAIL COMPOSE FUNCTION=================
    this.gmCompClick = function(aIndex, aSelect) {
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
        this.go = function(aIndex, aSelect) {
          if (doMain == "" || doMain == null || doMain == undefined) {
          gBrowser.selectedTab = gBrowser.addTab(
          "https://www.google.com/accounts/ServiceLoginAuth?" +
          "&service=mail&rm=false&ltmpl=wsad&continue=https://mail.google.com/mail" +
          "?view=cm&fs=1" +
          "&Email=" + userName +
          "&Passwd=" + passWord +
          "&PersistentCookie=no", null, null, null, !aSelect
          );
        return;
          }
          else {
          function goTo() {
            gBrowser.selectedTab = gBrowser.addTab(
              "https://www.google.com/a/" +
              doMain +
              "/ServiceLogin?service=mail&passive=true&nui=1&continue=https://mail.google.com/a/" +
              doMain +
              "?view=cm&fs=1", null, null, null
            );
          }
          goTo();
          function submitForm() {
            var name=content.document.forms[0].elements[3];
            var pass=content.document.forms[0].elements[4];
            name.value=userName;
            pass.value=passWord;
            content.document.forms[0].submit();
          }
          window.setTimeout(submitForm,1500);
          submitForm();
          }
        }
      //========IF THERE IS NO USERNAME SPECIFIED===========
      if (this.ss[aIndex].username == "") {
        this.usrnmP(index);
        if (username.value == "" || password.value == "" || !username.value || !password.value) return;
        else if (!this.ss[aIndex].domain == "" && !check.value) {
            var domain=this.ss[aIndex].domain;
        }
        else if (check.value) {
    	var domain, uri;
    	domain = prompt('Insert your domain for your Google Domain account\ni.e. - phpbbnow.com, google.com, or mozillazine.org','','Google Domain');
        }
          var doMain=domain;
          var userName=username.value;
          var passWord=password.value;
          this.go(index);
          return;
      }
      //========IF THERE IS NO PASSWORD SPECIFIED===========
      else if (this.ss[aIndex].password == "") {
        this.pswrdP(index);
        if (input.value == "" || !input.value) return;
        else if (!this.ss[aIndex].domain == "") {
            var domain=this.ss[aIndex].domain;
        }
        else if (check.value) {
    	var domain, uri;
    	domain = prompt('Insert your domain for your Google Domain account\ni.e. - phpbbnow.com, google.com, or mozillazine.org','','Google Domain');
        }
          var doMain=domain;
          var userName=this.ss[aIndex].username;
          var passWord=input.value;
          this.go(index);
          return;
      }
      //========IF BOTH USERNAME & PASSWORD ARE SPECIFIED===========
      else {
        var userName=this.ss[aIndex].username;
        var passWord=this.ss[aIndex].password;
        var doMain=this.ss[aIndex].domain;
        this.go(index);
        return;
      }
    }
    //==============END LEFT-CLICK GMAIL COMPOSE FUNCTION=================
    //==============BEGIN DRAG&DROP GMAIL COMPOSE FUNCTION=================
    this.gmComp = function(event, dDat, session, aIndex, aSelect) {
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
    //=======DETERMINES HOW TO INTERPRET THE DRAGGED TEXT=============
        var prs=unescape(dDat.data);
        var str=escape(prs); //escapes the string, replacing special characters and spaces
        var indA=str.indexOf("mailto:"); //finds beginning of link
        var indB=str.indexOf("
    "); //finds first occurrence of linebreak
        var str0=str.slice(indA+9,indB); //removes beginning mailto & anything after linebreak from string
        var ind4=str0.indexOf("?"); //finds location of the first occurrance of ?
        var ind5=str0.indexOf("@"); //finds location of the first occurrance of @
        var res1=str0.substring(0,ind4);  //email
    //=======PARSES THE STRING, DELIVERS CORRECT DRAGGED EMAIL & LOADS THE URL=======
      this.go = function(event,dDat,session,index) {
        if(str.match("mailto:") && ind4>0) var eMail=res1;
        else if(str.match("mailto:") && ind4<1) var eMail=str0;
        else var eMail=prs;
          if (doMain == "" || doMain == null || doMain == undefined) {
          gBrowser.selectedTab = gBrowser.addTab(
          "https://www.google.com/accounts/ServiceLoginAuth?" +
          "&service=mail&rm=false&ltmpl=wsad&continue=https://mail.google.com/mail" +
          "?view=cm&fs=1" +
          "&to=" + eMail +
          "&Email=" + userName +
          "&Passwd=" + passWord +
          "&PersistentCookie=no", null, null, null, !aSelect
          );
          }
          else {
          function goTo() {
            gBrowser.selectedTab = gBrowser.addTab(
              "https://www.google.com/a/" +
              doMain +
              "/ServiceLogin?service=mail&passive=true&nui=1&continue=https://mail.google.com/a/" +
              doMain +
              "?view=cm&fs=1" +
              "&to=" + eMail, null, null, null
            );
          }
          goTo();
          function submitForm() {
            var name=content.document.forms[0].elements[3];
            var pass=content.document.forms[0].elements[4];
            name.value=userName;
            pass.value=passWord;
            content.document.forms[0].submit();
          }
          window.setTimeout(submitForm,2000);
          submitForm();
          }
        return;
      }
      //========IF THERE IS NO USERNAME SPECIFIED===========
      if (this.ss[aIndex].username == "") {
        this.usrnmP(index);
        if (username.value == "" || password.value == "" || !username.value || !password.value) return;
        else if (!this.ss[aIndex].domain == "" && !check.value) {
            var domain=this.ss[aIndex].domain;
        }
        else if (check.value) {
    	var domain, uri;
    	domain = prompt('Insert your domain for your Google Domain account\ni.e. - phpbbnow.com, google.com, or mozillazine.org','','Google Domain');
        }
          var doMain=domain;
          var userName=username.value;
          var passWord=password.value;
          this.go(index);
          return;
      }
      //========IF THERE IS NO PASSWORD SPECIFIED===========
      else if (this.ss[aIndex].password == "") {
        this.pswrdP(index);
        if (input.value == "" || !input.value) return;
        else if (!this.ss[aIndex].domain == "") {
            var domain=this.ss[aIndex].domain;
        }
        else if (check.value) {
    	var domain, uri;
    	domain = prompt('Insert your domain for your Google Domain account\ni.e. - phpbbnow.com, google.com, or mozillazine.org','','Google Domain');
        }
          var doMain=domain;
          var userName=this.ss[aIndex].username;
          var passWord=input.value;
          this.go(index);
          return;
      }
      //========IF BOTH USERNAME & PASSWORD ARE SPECIFIED===========
      else {
        var userName=this.ss[aIndex].username;
        var passWord=this.ss[aIndex].password;
        var doMain=this.ss[aIndex].domain;
        this.go(index);
        return;
      }
    }
    //==============END DRAG&DROP GMAIL COMPOSE FUNCTION=================
    //===========DETERMINES WHICH ACCOUNT IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function(aNode) {
      var prefstring = "custombuttons.gmailCompose.index";
      try {
        var ssIdx = gPrefService.getIntPref(prefstring);
      } catch(ex) {
        var ssIdx = 0;
        gPrefService.setIntPref(prefstring, ssIdx);
      }
      for(var i = 0; i < aNode.childNodes.length; i++) {
        aNode.childNodes[i].removeAttribute("checked");
      }
      aNode.childNodes[ssIdx].setAttribute("checked", true);
    }
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      var prefstring = "custombuttons.gmailCompose.index";
      gPrefService.setIntPref(prefstring, aNode.getAttribute("index"));
      aNode.checked = true;
      //uncomment the following 2 lines to execute gmailCompose after selecting a username
      //var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
      //this.gmCompClick(index);
    }
    //========ADDS THE ACCOUNTS TO THE CONTEXT MENU==============
    function addMenuItem(aNode, aObject, aIndex, aLabel, aUsername, aPassword) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("oncommand", "document.popupNode.setIndex(this)");
      mi.setAttribute("index", aIndex);
      mi.setAttribute("label", aLabel);
      mi.setAttribute("username", aUsername);
      mi.setAttribute("password", aPassword);
      mi.setAttribute("type", "checkbox");
      mi.setAttribute("group", "gmailCompose");
      mi.setAttribute("autoCheck", false);
    }
    //========MOVES THE CB CONTEXT MENU TO A SUBMENU=============
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
      var m = aNode.appendChild(document.createElement("menu"));
      m.setAttribute("label", "Custom Button");
      var mp = m.appendChild(document.createElement("menupopup"));
      copyMenuItems(mp, "custombuttons-contextpopup");
      aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    const popupID = "cbContext-gmailCompose";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.getIndex(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    for(var i = 0; i < this.ss.length; i++) {
      addMenuItem(pop, this, i, this.ss[i].label, this.ss[i].username, this.ss[i].password);
    }
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
        var index = gPrefService.getIntPref("custombuttons.gmailCompose.index");
      if (this.ss[aIndex].domain == "") {
      if (this.ss[aIndex].username) {this.tooltipText = this.ss[aIndex].username + '@gmail.com';}
      else {this.tooltipText = 'Gmail Compose';}
      }
      else {
      if (this.ss[aIndex].username) {this.tooltipText = this.ss[aIndex].username + "@" + this.ss[aIndex].domain;}
      else {this.tooltipText = 'Gmail Compose';}
      }
    }
    //=======END TOOLTIP FUNCTION=======================================
    cloneCBContext(pop);
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "var index = gPrefService.getIntPref(\"custombuttons.gmailCompose.index\"); this.toolTip(index); this.style.opacity = \'.99\';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    this.setAttribute("onclick", "if (event.button == 1 || (event.button == 0 && event.ctrlKey)) {var index = gPrefService.getIntPref(\"custombuttons.gmailCompose.index\"); this.gMail(index);} else if (event.button == 0) {var index = gPrefService.getIntPref(\"custombuttons.gmailCompose.index\"); this.gmCompClick(index);}");
    this.setAttribute("context", popupID);
    this.setAttribute("author",'m435tr0d');								// Stores Author.
    this.setAttribute("version",'20070413.00b');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/gmail-compose.html');	        // Stores HomePage.
    this.setAttribute("dependency",'userChrome,FF 2.0,CB 0.0.2a');					// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute("help",'0,=================== Left-Click ====================\n\n    ==Accounts Hardcoded==\n\n    Opens the currently selected account\'s GMail Compose tab\n\n    ==Nothing Hardcoded==\n\n    Prompts for username and/or password\n    and opens the inserted account\'s compose tab\n\n================== Middle-Click ===================\n\n    Opens the currently selected account\'s GMail Inbox\n\n=================== Right-Click ===================\n\n    Context Menu with hardcoded accounts\n    and submenu for CB Context\n \n ');
    

    Help Tab

    =================== Left-Click ====================
        ==Accounts Hardcoded==
        Opens the currently selected account's GMail Compose tab
        ==Nothing Hardcoded==
        Prompts for username and/or password
        and opens the inserted account's compose tab
    ================== Middle-Click ===================
        Opens the currently selected account's GMail Inbox
    =================== Right-Click ===================
        Context Menu with hardcoded accounts
        and submenu for CB Context
     
  214. GMail Really Delete (IMAP)

    Code Tab

    /* You must edit the button with your username below */
    var name="";
    if(name) {
    MsgMoveMessage("imap://"+name+"@imap.gmail.com/[Gmail]/Trash")
    }
    else {
      custombuttons.alertSlide(this.label+" Error","You must edit the button with your username!");
    }

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080409.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/gmail-really-delete-imap.html');
    this.setAttribute("dependency",'TB 2.0*,CB 2.0.7.5*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    You must edit the button with your username.
    After doing so:
      Select your messages
      Click the button
      Watch them get trashed!
  215. Go

    Code Tab

    Initialization Tab

    var MItem,mPop;
    //------menu items--------
    var apps=new Array;
    apps.push(['Google','http://www.google.com/',this.image]);
    apps.push(['gmail','http://www.gmail.com',this.image]);
    apps.push('separator');
    apps.push(['Yahoo','http://www.yahoo.com',this.image]);
    //------/menu items-------
    MItem=function(value){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',apps[value] [0]);
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',apps[value] [2]);
      mItem.value = value;
      mItem.tooltipText = apps[value] [1];
      return mItem;
    }
    //this.orient="vertical";
    mPop=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mPop.appendChild(document.createElement('menuseparator'));
     }else{
       mPop.appendChild(MItem(i));
     }
    }
    this.onMouseOver = function() {
      var homePage = gHomeButton.getHomePage();
      homePage = homePage.replace(/\|/g,', ');
      this.tooltipText = srcUrl;
    }
    function selectedText() {
      var focusedWindow, winWrapper, aSelection;
      focusedWindow = document.commandDispatcher.focusedWindow;
      winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      aSelection = winWrapper.getSelection().toString();
      aSelection =aSelection.replace(/\s/,"");
      return aSelection;
    }
    function searchBox() {
      var urlbar;
      urlbar= document.getElementById("urlbar");
      return urlbar.value;
    }
    this.Go=function(evt)
    {
    	var index=evt.target.value;
    	if(index==-1)
    	{
    		 if(selectedText() != "") query = selectedText();
    		  else if(searchBox()) query = searchBox();
    		gBrowser.selectedTab = gBrowser.addTab(query);
    	}
    	else
    	{
    		gBrowser.selectedTab = gBrowser.addTab(apps[index] [1]);
    	}
    }
    this.setAttribute("onmouseover", "this.onMouseOver()");
    this.setAttribute("oncommand", "this.Go(event);");
    this.appendChild(mPop);
    this.type = "menu-button";
    this.value=-1;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/advanced-go-button.html');

    Help Tab

  216. Go

    Code Tab

    /* -------------------------------------------------------------
         Go Button Enhancement
         by LouCypher (aka Zoolcar9)
         Go button with click events and context menu
         Left click opens location
         Middle click or ctrl+click opens location in new tab
         Shift+click opens location in new window
         Alt+click opens location in sidebar
       ------------------------------------------------------------- */
    

    Initialization Tab

    this.clickAndGo = function(evt) {
      if(evt.button == 0 && !evt.shiftKey && !evt.ctrlKey && !evt.altKey)
        handleURLBarCommand(evt);
      if(evt.button == 1 || (evt.button == 0 && evt.ctrlKey))
        gBrowser.selectedTab = gBrowser.addTab(gURLBar.value);
      if(evt.shiftKey) window.open(gURLBar.value);
      if(evt.altKey) openWebPanel("", gURLBar.value);
    }
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    function addMenuItem(label, command, click, separator, node) {
      var mItem = document.createElement("menuitem");
      mItem.setAttribute("label", label);
      mItem.setAttribute("oncommand", command);
      if(click) mItem.setAttribute("onclick", "checkForMiddleClick(this, event);");
      node.appendChild(mItem);
      if(separator) node.appendChild(document.createElement("menuseparator"));
    }
    const contextId = "cbContext-goButton";
    var test = document.getElementById(contextId);
    if(test) test.parentNode.removeChild(test);
    var items, item;
    items = new Array;
    items.push(["Paste and Go", "openUILink(readFromClipboard(), event, false, true);",
                true, true]);
    items.push(["Paste", "gURLBar.value = readFromClipboard();", false, false]);
    items.push(["Copy", "Components.classes['@mozilla.org/widget/clipboardhelper;1']" +
                ".getService(Components.interfaces.nsIClipboardHelper)" +
                ".copyString(gURLBar.value);", false, false]);
    items.push(["Cut", "Components.classes['@mozilla.org/widget/clipboardhelper;1']" +
                ".getService(Components.interfaces.nsIClipboardHelper)" +
                ".copyString(gURLBar.value); gURLBar.value = ''; gURLBar.focus();",
                false, false]);
    items.push(["Clear", "gURLBar.value = ''; gURLBar.focus();", false, true]);
    items.push(["Reset", "gURLBar.value = gBrowser.currentURI.spec;", false, true]);
    var mPopup, subPopup, subMenu;
    mPopup = document.createElement("popup");
    mPopup.id = contextId;
    subPopup = document.createElement("menupopup");
    subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    copyMenuItems(subPopup, "custombuttons-contextpopup");
    for(var i = 0; i < items.length; i++) {
      item = items[i];
      addMenuItem(item[0], item[1], item[2], item[3], mPopup);
    }
    subMenu.appendChild(subPopup);
    mPopup.appendChild(subMenu);
    document.getElementById("mainPopupSet").appendChild(mPopup);
    this.setAttribute("onclick", "this.clickAndGo(event)");
    this.setAttribute("context", contextId);
    this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, goButtonObserver)");
    this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, goButtonObserver)");
    this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, goButtonObserver)");
    this.tooltipText = "Type a location in the Location Bar, then click Go";
    this.style.padding = "2px 5px 2px 3px";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-button-enhancement.html');

    Help Tab

  217. Go

    Code Tab

    /*Code*/
    gURLBar.handleCommand(event);
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20100414.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-button.html');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    //this.tooltipText = '    ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/
    
  218. Go Bottom: by ithinc

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
      if (content.scrollY + content.innerHeight < content.document.height) {
        content.scrollTo(0, content.document.height);
      } else {
        content.scrollTo(0, 0);
      }
    }
    this.rightclick = function(e) {
      if (content.scrollY > 0) {
        content.scrollTo(0, 0);
      } else {
        content.scrollTo(0, content.document.height);
      }
    }
    this.midclick = function(e) {
      content.scrollTo(0, (content.document.height - content.innerHeight)/2);
    }
    this.leftDclick = this.midclick;
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.tooltipText = "L: Go Bottom|R: Go Top|M: Go Middle";
    this.setAttribute('author','ithinc');
    this.setAttribute('version','20080314.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/topmiddlebottom-page-button-group.html');
    this.setAttribute('dependency','FF2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    Left:
        * Go to Bottom
        * If at the bottom - Go to Top
    Middle:
        * Go to Middle of Page
    Right:
        * Go to Top
        * If at the Top - Go to Bottom
    Left Dbl:
        * Go to Middle of Page
    
  219. Go to bottom of the page

    Code Tab

    content.scrollTo(0,content.document.height);

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-top-and-go-bottom.html');

    Help Tab

  220. Go to top of the page

    Code Tab

    content.scrollTo(0,0);

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-top-and-go-bottom.html');

    Help Tab

  221. Go Up

    Code Tab

    /* ***** BEGIN LICENSE BLOCK *****
     * Version: MPL 1.1/GPL 2.0/LGPL 2.1
     *
     * The contents of this file are subject to the Mozilla Public License Version
     * 1.1 (the "License"); you may not use this file except in compliance with
     * the License. You may obtain a copy of the License at
     * http://www.mozilla.org/MPL/
     *
     * Software distributed under the License is distributed on an "AS IS" basis,
     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     * for the specific language governing rights and limitations under the
     * License.
     *
     * The Original Code is Go Up extension for Firefox.
     *
     * The Initial Developer of the Original Code is Stephen Clavering.
     *
     * Portions created by the Initial Developer are Copyright (C) 2004
     * the Initial Developer. All Rights Reserved.
     *
     * Contributor(s):
     *    Stephen Clavering <mozilla@clav.me.uk>
     *    Chris Neale <cdn@mozdev.org>
     *
     * Alternatively, the contents of this file may be used under the terms of
     * either the GNU General Public License Version 2 or later (the "GPL"), or
     * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     * in which case the provisions of the GPL or the LGPL are applicable instead
     * of those above. If you wish to allow use of your version of this file only
     * under the terms of either the GPL or the LGPL, and not to allow others to
     * use your version of this file under the terms of the MPL, indicate your
     * decision by deleting the provisions above and replace them with the notice
     * and other provisions required by the GPL or the LGPL. If you do not delete
     * the provisions above, a recipient may use your version of this file under
     * the terms of any one of the MPL, the GPL or the LGPL.
     *
     * ***** END LICENSE BLOCK ***** */
    this.goup_up(event);
    

    Initialization Tab

    this.goup_up = function(e) {
      const loc = content.document.location, pro = loc.protocol;
      if(!/^ftp|http|https$/.test(pro)) return;
      const up = goup_getUpUrl(loc.href);
      if(up) openUILink(up, e);
    }
    function goup_getUpUrl(url) {
        var matches, origUrl = url;
        // trim filename (this makes subdriectory digging easier)
        matches = url.match(/(^.*\/)(.*)/);
        if(!matches) return null; //only fails if "url" has no /'s
        url = matches[1];
        if(url!=origUrl && !/(index|main)\.(php3?|html?)/i.test(url))
          return url;
        // dig through subdirs
        matches = url.match(/^([^\/]*?:\/\/.*\/)[^\/]+?\//);
        if(matches) return matches[1];
        // we've reach (ht|f)tp://foo.com/, climb up through subdomains
        // split into protocol and domain
        matches = url.match(/([^:]*:\/\/)?(.*)/);
        var protocol = matches[1], domain = matches[2];
        matches = domain.match(/^[^\.]*\.(.*)/);
        if(matches) return (protocol+matches[1]);
        return null;
    }
    this.setAttribute("onclick", "if(event.button == 1) checkForMiddleClick(this, event)");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go.html');

    Help Tab

  222. Go up (context menu)

    Code Tab

    /*
        Left click the button to go up a level in the current URL.
        For example, from "http://custombuttons2.com/forum/buttons/" to "http://custombuttons2.com/forum/"
        Right click the button to see the context menu of levels you can go to.
        Rawny ^^
    */  
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var EnabledImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAE1QND3MOM1MxMXUxLXJPYm9RDIgJEZgMF5QuD7EIMK4vC8YIB9cGC/IJMPUvPNpEWZE2XY9TWK9ObpFvTvtKYM1Rbu5xarCOp6t0mZiXmbeTpKeTqKirt7i4mOyRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuS4KZgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACKSURBVChThc/rDsIgDAXgUre1Y4A6mbcVfP+nRIqZJsbE848vJxyA8hX4Bet0+nBt5PE8Xd9SYZ4eF143gXLj/bIcxk1AOGj8Mb86gMQuBMsY2zmDiFAINEtrpE5XOucdKmRBhRLJe4t9jL0xSSHv2DnLRGSktKeLIVtDeK8r7e40mJoh6ezf3z4B++aXr0XABJYAAAAASUVORK5CYII=";
    var DisabledImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAANUZRWTdJU1JSb3BxlnqMi4qKmZiXqKirt7i4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/eQtgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABqSURBVChThY9RDsMwCEOhuGDuf+AMiNJK06T5j4cBI+tL8gsk8OJyJBzxkAKOpPEQWWHufj9EaNjK7RErAWbqU6eQ0QAcBzFXrBxRIKvXwbzHFO64lA2ywUhjTXQeUPn2L4Sq1uI++/fbD8DUk3T7ilMCAAAAAElFTkSuQmCC";
    // ***** VARS ***** //
    var button = this;
    var URLs = [];
    // ***** FUNCTIONS ***** //
    function getURLs() {
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            var loc = gBrowser.contentDocument.location;
            URLs = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLs[URLs.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLs[URLs.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    function Reload()
    {
        getURLs();
        if (URLs.length > 0) {
            button.tooltipText = 'Go up to: \n '+URLs[0];
            button.image = EnabledImg;
        }
        else {
            button.tooltipText = 'Nowhere to go up to';
            button.image = DisabledImg;
        }
    }
    // ***** USED TO ADD THE ITEMS TO THE CONTEXT MENU ***** //
    function addMenuItem(aNode, aObject, aURL) {
    	var mi = aNode.appendChild(document.createElement("menuitem"));        
    	var commandstring = "gBrowser.selectedTab = openUILink('"+aURL+"', event, false, true);";
    	mi.setAttribute("oncommand", commandstring);
    	mi.setAttribute("onclick", "checkForMiddleClick(this, event)");
    	mi.setAttribute("label", aURL);
    	mi.tooltipText = aURL;
    }
    // ***** ADDS THE MENU ITEMS TO THE CONTEXT MENU ***** //
    const popupID = "cbContext-up";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.populateMenu(this, false)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    // ***** POPULATES THE CONTEXT MENU WITH THE URLS ***** //
    this.populateMenu = function(aNode) {  
    	while (aNode.hasChildNodes())
    		aNode.removeChild(aNode.firstChild);
    	URLs = [];
    	getURLs();
    	var l = URLs.length;
    	if (URLs.length == 0) {
    		aNode.appendChild(document.createElement("menuitem"));
    		aNode.firstChild.setAttribute("label", "Nowhere to go up to");
    		aNode.firstChild.setAttribute("disabled", "true");
    		return;
    	}
    	else {
    		for(var i = 0; i < l; i++) {
    			addMenuItem(pop, this, URLs[i]);
    		}
    	}
    }
    // ***** SHOW POPUP FUNCTION ***** // 
    this.showPopup = function(node) {
    	var popup = document.getElementById("cbContext-up");
    	var x = node.boxObject.x;
    	var y = node.boxObject.y + node.boxObject.height + 24;
    	document.popupNode = node;
    	popup.showPopup(node, x, y, "popup", null, null);
    }
    // ***** MOUSE/EVENT HANDLING ***** //
    this.leftclick = function(evt) 
    {
      getURLs();
      if (URLs.length > 0) {
        loadURI(URLs[0]);
      }
    }
    this.rightclick = function(evt) 
    {
        this.showPopup(this);
    }
    function Closed(event)
    {
      // Remove event listener
      window.removeEventListener("focus", Reload, true);
    }
    // ***** INITIALISATION ***** //
    this.setAttribute("context", popupID);
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    window.addEventListener("focus", Reload, true);
    window.onclose = Closed;
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1.3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-buttons.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to go up a level in the current URL.
    For example, from "http://custombuttons2.com/forum/buttons/" to "http://custombuttons2.com/forum/"
    Right click the button to see the context menu of levels you can go to.
  223. Go up (drop-marker menu button)

    Code Tab

    /*
        Left click the main button to go up a level in the current URL.
        For example, from "http://custombuttons2.com/forum/buttons/" to "http://custombuttons2.com/forum/"
        Left click the drop-down marker to see the menu of URL levels you can go to.
        For example, if you were at "http://custombuttons2.com/forum/buttons/", the menu would show:
          - "http://custombuttons2.com/forum/" 
          - "http://custombuttons2.com/"
        Rawny ^^
    */
    var URLsC = [];
    function getURLsC() {
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            var loc = gBrowser.contentDocument.location;
            URLsC = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLsC[URLsC.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLsC[URLsC.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLsC[URLsC.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLsC[URLsC.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLsC[URLsC.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    getURLsC();
    if (URLsC.length > 0) {
        loadURI(URLsC[0]);
    }

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var EnabledImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAE1QND3MOM1MxMXUxLXJPYm9RDIgJEZgMF5QuD7EIMK4vC8YIB9cGC/IJMPUvPNpEWZE2XY9TWK9ObpFvTvtKYM1Rbu5xarCOp6t0mZiXmbeTpKeTqKirt7i4mOyRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuS4KZgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACKSURBVChThc/rDsIgDAXgUre1Y4A6mbcVfP+nRIqZJsbE848vJxyA8hX4Bet0+nBt5PE8Xd9SYZ4eF143gXLj/bIcxk1AOGj8Mb86gMQuBMsY2zmDiFAINEtrpE5XOucdKmRBhRLJe4t9jL0xSSHv2DnLRG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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/eQtgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABqSURBVChThY9RDsMwCEOhuGDuf+AMiNJK06T5j4cBI+tL8gsk8OJyJBzxkAKOpPEQWWHufj9EaNjK7RErAWbqU6eQ0QAcBzFXrBxRIKvXwbzHFO64lA2ywUhjTXQeUPn2L4Sq1uI++/fbD8DUk3T7ilMCAAAAAElFTkSuQmCC";
    // ***** VARS ***** //
    var button = this;
    var URLs = [];
    // ***** FUNCTIONS ***** //
    function getURLs() {
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            var loc = gBrowser.contentDocument.location;
            URLs = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return URLs;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLs[URLs.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLs[URLs.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    function Reload()
    {
        getURLs();
        if (URLs.length > 0) {
            button.tooltipText = 'Go up to: \n '+URLs[0];
            button.image = EnabledImg;
        }
        else {
            button.tooltipText = 'Nowhere to go up to';
            button.image = DisabledImg;
        }
    }
    // ***** POPULATES THE CONTEXT MENU WITH THE URLS ***** //
    this.popupShowing = function(aNode) {
    	while (aNode.hasChildNodes())
    		aNode.removeChild(aNode.firstChild);
    	URLs = [];
    	getURLs();
    	var l = URLs.length;
    	if (URLs.length == 0) {
    		aNode.appendChild(document.createElement("menuitem"));
    		aNode.firstChild.setAttribute("label", "Nowhere to go up to");
    		aNode.firstChild.setAttribute("disabled", "true");
    		return;
    	}
    	else {
    		for(var i = 0; i < l; i++) {
                        var mi = document.createElement("menuitem");
                        var commandstring = "gBrowser.selectedTab = openUILink('"+URLs[i]+"', event, false, true);";
                        mi.setAttribute("oncommand", commandstring);
                        mi.setAttribute("onclick", "checkForMiddleClick(this, event)");
                        mi.setAttribute("label", URLs[i]);
                        mi.tooltipText = URLs[i];
                        mPopup.appendChild(mi);
    		}
    	}
    }
    // ***** MOUSE/EVENT HANDLING ***** //
    function Closed(event)
    {
      // Remove event listener
      window.removeEventListener("focus", Reload, true);
    }
    // ***** INITIALISATION ***** //
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    this.appendChild(mPopup);
    this.type = "menu-button";
    window.addEventListener("focus", Reload, true);
    window.onclose = Closed;
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1.3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-buttons.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the main button to go up a level in the current URL.
    For example, from "http://custombuttons2.com/forum/buttons/" to "http://custombuttons2.com/forum/"
    Left click the drop-down marker to see the menu of URL levels you can go to.
    For example, if you were at "http://custombuttons2.com/forum/buttons/", the menu would show:
      - "http://custombuttons2.com/forum/" 
      - "http://custombuttons2.com/"
  224. Go up (menu button)

    Code Tab

    /*
        Left click the button to see the menu of URL levels you can go to.
        For example, if you were at "http://custombuttons2.com/forum/buttons/", the menu would show:
          - "http://custombuttons2.com/forum/" 
          - "http://custombuttons2.com/"
        Rawny ^^
    */  
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var EnabledImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAE1QND3MOM1MxMXUxLXJPYm9RDIgJEZgMF5QuD7EIMK4vC8YIB9cGC/IJMPUvPNpEWZE2XY9TWK9ObpFvTvtKYM1Rbu5xarCOp6t0mZiXmbeTpKeTqKirt7i4mOyRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuS4KZgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACKSURBVChThc/rDsIgDAXgUre1Y4A6mbcVfP+nRIqZ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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/eQtgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABqSURBVChThY9RDsMwCEOhuGDuf+AMiNJK06T5j4cBI+tL8gsk8OJyJBzxkAKOpPEQWWHufj9EaNjK7RErAWbqU6eQ0QAcBzFXrBxRIKvXwbzHFO64lA2ywUhjTXQeUPn2L4Sq1uI++/fbD8DUk3T7ilMCAAAAAElFTkSuQmCC";
    // ***** VARS ***** //
    var button = this;
    var URLs = [];
    // ***** FUNCTIONS ***** //
    function getURLs() {
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            var loc = gBrowser.contentDocument.location;
            URLs = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLs[URLs.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLs[URLs.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    function Reload()
    {
        getURLs();
        if (URLs.length > 0) {
            button.tooltipText = 'L: Show menu of URL levels you can go to.';
            button.image = EnabledImg;
        }
        else {
            button.tooltipText = 'Nowhere to go up to';
            button.image = DisabledImg;
        }
    }
    // ***** POPULATES THE CONTEXT MENU WITH THE URLS ***** //
    this.popupShowing = function(aNode) {
    	while (aNode.hasChildNodes())
    		aNode.removeChild(aNode.firstChild);
    	URLs = [];
    	getURLs();
    	var l = URLs.length;
    	if (URLs.length == 0) {
    		aNode.appendChild(document.createElement("menuitem"));
    		aNode.firstChild.setAttribute("label", "Nowhere to go up to");
    		aNode.firstChild.setAttribute("disabled", "true");
    		return;
    	}
    	else {
    		for(var i = 0; i < l; i++) {
                        var mi = document.createElement("menuitem");
                        var commandstring = "gBrowser.selectedTab = openUILink('"+URLs[i]+"', event, false, true);";
                        mi.setAttribute("oncommand", commandstring);
                        mi.setAttribute("onclick", "checkForMiddleClick(this, event)");
                        mi.setAttribute("label", URLs[i]);
                        mi.tooltipText = URLs[i];
                        mPopup.appendChild(mi);
    		}
    	}
    }
    // ***** MOUSE/EVENT HANDLING ***** //
    function Closed(event)
    {
      // Remove event listener
      window.removeEventListener("focus", Reload, true);
    }
    // ***** INITIALISATION ***** //
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    this.appendChild(mPopup);
    this.type = "menu";
    this.setAttribute("class", "menu-iconic");
    window.addEventListener("focus", Reload, true);
    window.onclose = Closed;
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1.3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-buttons.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to see the menu of URL levels you can go to.
    For example, if you were at "http://custombuttons2.com/forum/buttons/", the menu would show:
      - "http://custombuttons2.com/forum/" 
      - "http://custombuttons2.com/"
  225. Go up (no menu)

    Code Tab

    /*
        Left click the button to go up a level in the current URL.
        For example, from "http://custombuttons2.com/forum/buttons/" to "http://custombuttons2.com/forum/"
        Rawny ^^
    */  
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var EnabledImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAE1QND3MOM1MxMXUxLXJPYm9RDIgJEZgMF5QuD7EIMK4vC8YIB9cGC/IJMPUvPNpEWZE2XY9TWK9ObpFvTvtKYM1Rbu5xarCOp6t0mZiXmbeTpKeTqKirt7i4mOyRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuS4KZgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACKSURBVChThc/r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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/eQtgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABqSURBVChThY9RDsMwCEOhuGDuf+AMiNJK06T5j4cBI+tL8gsk8OJyJBzxkAKOpPEQWWHufj9EaNjK7RErAWbqU6eQ0QAcBzFXrBxRIKvXwbzHFO64lA2ywUhjTXQeUPn2L4Sq1uI++/fbD8DUk3T7ilMCAAAAAElFTkSuQmCC";
    // ***** VARS ***** //
    var button = this;
    var URLs = [];
    // ***** FUNCTIONS ***** //
    function getURLs() {
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            var loc = gBrowser.contentDocument.location;
            URLs = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLs[URLs.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLs[URLs.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    function Reload()
    {
        getURLs();
        if (URLs.length > 0) {
            button.tooltipText = 'Go up to: \n '+URLs[0];
            button.image = EnabledImg;
        }
        else {
            button.tooltipText = 'Nowhere to go up to';
            button.image = DisabledImg;
        }
    }
    // ***** MOUSE/EVENT HANDLING ***** //
    this.leftclick = function(evt) 
    {
      getURLs();
      if (URLs.length > 0) {
        loadURI(URLs[0]);
      }
    }
    function Closed(event)
    {
      // Remove event listener
      window.removeEventListener("focus", Reload, true);
    }
    // ***** INITIALISATION ***** //
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    window.addEventListener("focus", Reload, true);
    window.onclose = Closed;
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1.3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-buttons.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to go up a level in the current URL.
    For example, from "http://custombuttons2.com/forum/buttons/" to "http://custombuttons2.com/forum/"
  226. Google

    Code Tab

    //Usage
    /*
    1. Assign Search engine
       Method1. Clone Button and Select Engine by Shift + RightClick
       Method2. Clone Button and Edit Button by Shift + Middle Click and Input the engine name to Name field
    2. 検索の仕方
       Left Click  : Seacrh in current tab
       Middle Click: Search in new tab
       Right Click : Search clipboard in current tab
       Ctlr + Left Click  : Search in new tab
       Ctrl + Middle Click: Search clipboard in current tab
       Shift + click: menu
    */

    Initialization Tab

    setTimeout(function(that){
    /*初期設定コード(スタートアップで実行)*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    that.setAttribute('persist',"label");
    that.setAttribute('author','Alice0775');
    that.setAttribute('version','20071008.00');
    that.setAttribute('homepage','http://space.geocities.yahoo.co.jp/gl/alice0775');
    that.setAttribute('dependency','null');
    that.setAttribute('status','null');
    that.setAttribute('public',true);
    that.setAttribute('help','2,search w/ Searchbar Text or Clipboard Text');
    //エンジン名からエンジンオブジェクトを得る
    that.getEngine = function(aEngineName){
      const nsIBSS = Components.interfaces.nsIBrowserSearchService;
      const searchService = Components.classes["@mozilla.org/browser/search-service;1"].getService(nsIBSS);
      if(aEngineName.toUpperCase()==="CURRENT"){
        try{
          var searchBar = BrowserSearch.getSearchBar();
        }catch(e){
          var searchBar = BrowserSearch.searchBar;  //fx3
        }
        if (searchBar) return  searchBar.currentEngine;
      }else{
        var engine = searchService.getEngineByName(aEngineName);
        if (engine) return engine;
      }
      //Default
      return Components.classes['@mozilla.org/browser/search-service;1'].getService(Components.interfaces.nsIBrowserSearchService).defaultEngine;
    }
    //検索バーのテキストで検索
    that.searchForSearchBarTextValue = function(aEngine, aEvent) {
      var searchBar = document.getElementById("searchbar");
      if(searchBar.hasAttribute("empty")) return false;
      keyword = searchBar.value;
      var submission = aEngine.getSubmission(keyword, null);
      if ( (aEvent.button == 1 || aEvent.ctrlKey) && gBrowser.currentURI.spec != "about:blank")
        gBrowser.loadOneTab(submission.uri.spec, null, null,
                            submission.postData, false);
      else
        gBrowser.loadURI(submission.uri.spec, null, submission.postData);
      content.focus();
      if (keyword) {
        keyword = keyword.substring(0,1024);
        searchBar.textbox._formHistSvc.addEntry(searchBar.textbox.getAttribute("autocompletesearchparam"),keyword);
      }
      aEvent.preventDefault();
      aEvent.stopPropagation();
      return true;
    }
    //クリップボードのテキストを得る
    that.getClipboardText = function(){
      try {
        var clip = Components.classes["@mozilla.org/widget/clipboard;1"]
                     .createInstance(Components.interfaces.nsIClipboard);
        var trans = Components.classes["@mozilla.org/widget/transferable;1"]
                      .createInstance(Components.interfaces.nsITransferable);
        trans.addDataFlavor("text/unicode");
        clip.getData(trans, clip.kGlobalClipboard);
        var string = {};
        trans.getTransferData("text/unicode", string, {});
        return string.value.QueryInterface(Components.interfaces.nsISupportsString).data;
      } catch (e) {
        return "";
      }
    }
    //クリップボードの内容で検索
    that.searchForClipboardText = function(aEngine, aEvent) {
      var keyword = that.getClipboardText().replace(/^\s+|\s+$/g, "");
      if (!keyword) return false;
      var searchBar = document.getElementById("searchbar");
      searchBar.value = keyword;
      searchBar.removeAttribute("empty");
      var submission = aEngine.getSubmission(keyword, null);
      if (aEvent.ctrlKey && gBrowser.currentURI.spec != "about:blank")
        gBrowser.loadOneTab(submission.uri.spec, null, null,
                            submission.postData, false);
      else
        gBrowser.loadURI(submission.uri.spec, null, submission.postData);
      content.focus();
      if (keyword) {
        keyword = keyword.substring(0,1024);
        searchBar.textbox._formHistSvc.addEntry(searchBar.textbox.getAttribute("autocompletesearchparam"),keyword);
      }
      aEvent.preventDefault();
      aEvent.stopPropagation();
      return true;
    }
    //エンジンポップアップメニューの作成
    that.makeSelectEngine = function(){
       const nsIBSS = Components.interfaces.nsIBrowserSearchService;
       const searchService =Components.classes["@mozilla.org/browser/search-service;1"].getService(nsIBSS);
       var engines = searchService.getVisibleEngines({ });
       var menupopup = document.getElementById("button-contextpopup"+that.id);
       if(menupopup){
         while(menupopup.lastChild){menupopup.removeChild(menupopup.lastChild);}
       }else{
         var menupopup = document.createElement("menupopup");
         menupopup.setAttribute('id',"button-contextpopup"+that.id);
         that.appendChild(menupopup);
       }
       for (var i =  0; i <engines.length; i++) {
         var name = engines[i].name;
         if( name.match(/}/) && !name.match(/{/) || !name.match(/}/) && name.match(/{/) || name.match(/^-{2,}|^―{2,}/)) continue;
         var menuitem = document.createElement("menuitem");
         menuitem.setAttribute('label',name);
         menuitem.setAttribute('class','menuitem-iconic');
         menuitem.setAttribute('oncommand',"event.stopPropagation();this.parentNode.parentNode.setEngine('"+name+"');");
         menuitem.setAttribute('onclick',"event.stopPropagation();");
         if (engines[i].iconURI)  menuitem.setAttribute("src", engines[i].iconURI.spec);
         menupopup.appendChild(menuitem);
       }
    }
    //エンジン選択
    that.setEngine = function(name){
      if(!name) name = that.getAttribute('label');
      that.setAttribute('label',name);
      that.aEngine = that.getEngine(name);
      that.setAttribute('image',that.aEngine.iconURI.spec);
      that.tooltipText = document.getAnonymousElementByAttribute(document.getElementById("searchbar"),"anonid","searchbar-stringbundle").getFormattedString("searchtip", [that.aEngine.name])+" L:CurrentTab Ctrl+L,M:NewTab, or R:ClipBoard, Shift+LMR: Menu";
      var UI = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
      UI.charset = "UTF-8";
      var xpref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
      xpref.setCharPref("custombuttons.engine.name."+that.id, UI.ConvertFromUnicode(name));
    }
    //エンジン選択ポップアップメニュー表示
    that.showSelectEngine = function(node){
      var popup = document.getElementById("button-contextpopup"+that.id);
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    //ボタンメニュー表示
    that.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    //イベントハンドラ
    // ---------------   Event Detect   ------------------
    that.handle = function(event) {
      try {
        if(event.shiftKey && event.button==2) {
          event.preventDefault();
          event.stopPropagation();
          that.makeSelectEngine();
          that.showSelectEngine(this);
          return;
        }
        if(event.shiftKey ) {
          that.showPopup(this);
          return;
        }
        switch(event.button) {
        case 0: // Left Click
          that.searchForSearchBarTextValue(that.aEngine, event);
          break;
        case 1: // Middle Click
          that.searchForSearchBarTextValue(that.aEngine, event);
          break;
        case 2: // Right Click
          that.searchForClipboardText(that.aEngine, event);
          break;
        }
      }catch(e) {alert(e);}
      event.preventDefault();
      event.stopPropagation();
      return false;
    }
    //設定されたエンジンをセット
    try{ //Fx3
      var xpref = Components.classes["@mozilla.org/preferences-service;1"]
                                 .getService(Components.interfaces.nsIPrefBranch2);
    }catch(e){ //Fx2
      var xpref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
    }
    var UI = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
    UI.charset = "UTF-8";
    try{
      var name = xpref.getCharPref("custombuttons.engine.name."+that.id);
      that.setEngine(UI.ConvertToUnicode(name));
    }catch(e){
      var name = that.getAttribute('label');
            that.setEngine(name);
    }
    //クリックイベントセット
    that.setAttribute("onclick", "this.handle(event);");
    //ボタンの見栄え
    that.style.opacity = '.65';
    that.setAttribute('style','border-color: transparent;');
    that.setAttribute("onmouseover", "this.style.opacity = '1'; this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');" );
    that.setAttribute("onmouseout", "this.style.opacity = '.65';this.setAttribute('style','border-color: transparent;');" );
    that.setAttribute("onmousedown", "this.setAttribute('style','border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;');");
    that.setAttribute("onmouseup", "this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');");
    that.setAttribute('style','border-color: transparent;');
    },1000, this);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/search-engine-buttons.html');

    Help Tab

    search w/ Searchbar Text or Clipboard Text
  227. Google Calendar

    Code Tab

    /*Code*/
    var label = this.label;
    var link = "http://www.google.com/calendar/gadget?up_showAgenda=true&upt_showAgenda=hidden&up_calendarFeeds=({})&upt_calendarFeeds=hidden&up_firstDay=0&upt_firstDay=enum&up_dateFormat=0&upt_dateFormat=enum&up_timeFormat=1:00pm&upt_timeFormat=enum&up_calendarFeedsImported=0&upt_calendarFeedsImported=hidden&up_showCalendar2=1&upt_showCalendar2=bool&lang=en&country=us&.lang=en&.country=us&synd=ig&mid=0&parent=&libs=9yKJTwdwCZw/lib/libcore.js,DXEULJSfpLM/lib/libdynamic-height.js,c64nWSZKWFg/lib/libsetprefs.js";
    var head = (document.getElementById('sidebar-title').getAttribute('value') == label);
    if (!head) {
      function sbTitleModified(e) {
        document.getElementById('sidebar-title').setAttribute('value', label);
      }
      function sbClosed(e) {
        document.getElementById('viewWebPanelsSidebar').removeEventListener('DOMAttrModified', sbClosed, true);
        document.getElementById('sidebar-title').removeEventListener('DOMAttrModified', sbTitleModified, true);
        document.getElementById('sidebar-title').setAttribute('value', "");
      }
      openWebPanel(label, link);
      document.getElementById('sidebar-title').setAttribute('value', label);
      document.getElementById('sidebar-title').addEventListener('DOMAttrModified', sbTitleModified, true);
      document.getElementById('viewWebPanelsSidebar').addEventListener('DOMAttrModified', sbClosed, true);
    } else {
      toggleSidebar();
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('author','ithinc');
    this.setAttribute('version','20080315.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-calendar.html');
    this.setAttribute('dependency','Cb2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help set for
    <label> button
    custombuttons-button<id>
  228. Google Chrome.ran with Crossover Chromium

    Code Tab

    /*CODE*/
    var page = gBrowser.currentURI;
    var browser = "/opt/cxchromium/bin/chromium";
    var file =  Components.classes["@mozilla.org/file/local;1"]
                          .createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath(browser);
    var process = Components.classes["@mozilla.org/process/util;1"]
                            .createInstance(Components.interfaces.nsIProcess);
    process.init(file);
    process.run(false, [page.spec], 1);
    return true;
    

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-buttons-linux.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button launches the current page in Google Chrome
    It works on the linux operating system.
  229. Google maps link retrieval button

    Code Tab

    var allLinks, thisLink, pageLink;
    // If we're on a Google maps page
    if (content.document.location.href.match("maps.google")) {
      // Get all the links in the page
      allLinks = content.document.getElementsByTagName('a');
      // For each of the links
      for(var i=0; i < allLinks.length; i++) {
          thisLink = allLinks[i];
          // If it is the link to the map set pageLink to it
          if (thisLink.innerHTML.match( /Link/)) {
              pageLink = thisLink;
          }
      }
      // Copy the pageLink to the clipboard (for some reason this only seems to work if it's added to an empty string...)
      gClipboard.write(""+pageLink);
    }
    

    Initialization Tab

    this.tooltipText = "Google maps link retrieval:"+"\n"+"   L: Copies direct link to Google map into clipboard"+"\n"+"   R: CB² Context menu.";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-map-link-retrieval-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click: If you are on a Google maps page, the button retrieves the direct link to the map (from the page) and inserts it into the clipboard.
  230. Google Notebook

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    var label = "Google Notebook";
    var link = "http://www.google.com/notebook/ig?hl=__msg_locale__";
    this.leftclick = function(evt) {
      if (typeof SplitBrowser == "object") {
        var subBrowser = SplitBrowser.getSubBrowserByName(label);
        if (!subBrowser) {
          subBrowser = SplitBrowser.addSubBrowser(link, SplitBrowser.mainBrowserBox, SplitBrowser.POSITION_LEFT, label);
        } else {
          subBrowser.toggleCollapsed();
        }
        return;
      }
    }
    this.midclick = function(evt) {
      var head =(document.getElementById('sidebar-title').getAttribute('value') == label); 
      if (!head) {
        //openWebPanel(label, link);
        toggleSidebar('viewWebPanelsSidebar', true);
        document.getElementById('sidebar').setAttribute("src", link);
        document.getElementById('sidebar-title').setAttribute("value", label);
      } else {
        toggleSidebar('viewWebPanelsSidebar');
        if (document.getElementById('viewWebPanelsSidebar').getAttribute("checked") == "true") {
          document.getElementById('sidebar').setAttribute("src", link);
          document.getElementById('sidebar-title').setAttribute("value", label);
        }
      }
    }
    this.cleftclick = this.midclick;
    if (typeof SplitBrowser != "object") this.leftclick = this.midclick;
    this.setAttribute('onclick', 'gQuot(event, this);'); // Calls the Global MouseClick handler gQuot
    this.setAttribute("author",'ithinc');								// Stores Author.
    this.setAttribute("version",'20080222');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-notebook-splitted-browser-or-sidebar.html');      // Stores HomePage.
    this.setAttribute("dependency",'FF 2.0.0.*,CB2 2.0.*');			// Stores Dependency.
    this.setAttribute("status",'Development');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    

    Help Tab

    L%20%3D%20Toggle%20Google%20Notebook%20in%20Split%20Browser%0AM%20%3D%20Toggle%20Google%20Notebook%20in%20Sidebar%20%0AR%20%3D%20Context%20Menu
  231. Google Notebook

    Code Tab

     

    Initialization Tab

     this.quot = function(evt) {
    var link="http://www.google.com/notebook/ig?hl=__MSG_locale__";
    var label="gNotebook";
    var head =(document.getElementById('sidebar-title').getAttribute('value') == label);
      switch(evt.button) {
    case 2:
    this.showPopup(this);
    return;
    case 0:
       if (!head) {
          openWebPanel();
          var sbLoc = document.getElementById('sidebar').contentDocument.location;
          sbLoc.href = link;
          document.getElementById('sidebar-title').value = label;
          document.getElementById('sidebar-box').hidden = false;
          document.getElementById('sidebar-box').collapsed = false;
          document.getElementById('sidebar-splitter').hidden = false;
          return;
       }
       if (head) {
          document.getElementById('sidebar-title').value = null;
          document.getElementById('sidebar-box').hidden = true;
          document.getElementById('sidebar-box').collapsed = true;
          document.getElementById('sidebar-splitter').hidden = true;
          toggleSidebar();
       }
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    this.tooltipText = 'Google Notebook';
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sidebarbutton-maker-several-example-sidebar-buttons.html');

    Help Tab

  232. Google Reader

    Code Tab

    /* ----------------------------------------------------------------
    	Google Reader Button 0.1
    	by Dragan Bosnjak
    	http://wreza.bloger.hr
    	- Note that you need to modify code and add your Google user ID
    	  and favorite tags on top of initialization code
    	- Some code taken from URL-Tools 0.2 (10. Sep. 2006)
       ---------------------------------------------------------------- */
    gBrowser.selectedTab = gBrowser.loadURI("http://www.google.com/reader/");
    

    Initialization Tab

    /**** customize here -> ********************/
    var user_id = "01234567890";
    var user_tags = Array("css","javascript","php","web");
    var subscribeLabel = "Subscribe";
    var readerLabel = "Go to google.com/reader";
    /*******************************************/
    var subscribeImg = "data:image/gif;base64,R0lGODlhEAAQANU/APa/k+F/R+yabfKhZfrTtfqcOvGMNe2LNfqxae5/L+SERPeSMuBvLOh4MvqZNP7x5fujR/KHLPvk0PziyuV1J/OOPOV1Mv/06+Z8Mv/9/O2XTvqeQ+uRR/zv5/OXS91kJO6ENeyGMv3YsOhxI+RvIeuGNdxgLOmBQfrOpPzWsfjZx+eIWuN0LNteHeyFMPWVQvKbUfefSf738v/69v7iw/7o0O2KR+mJT/mjUOF3QeBsLul/L+mCNPGqev///////yH5BAEAAD8ALAAAAAAQABAAAAaEwJ9wSCwaj8jkUUGi7EoHg4FjVDR6g0pkUSg4NEWK7ZG5ALzeUBEDgiFSvhpkYeAVdx4JCofITAwJGEUuLykXMwgIPgAjFkUHCwsQNBkeBB0WDI8bNSIxMgADPisfRQYQDxMRBCo3HQItRRoOGxUJJyc6OSYBRhwuOxgsDDofOUrIyUJBADs=";
    var readerImg = "data:image/x-icon;base64,AAABAAIAEBAAAAAAAABoBQAAJgAAABAQAAAAAAAAaAQAAI4FAAAoAAAAEAAAACAAAAABAAgAAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAA////AMyinwC7lpMA57i1AP/08wD/9/cA997dAPzRzQD5ycUA98K9ALyJhAD+7OsA9OnoAPC0rwDorKcAqnh0AMysqQD4urUArYJ+APzZ1gDpxsQA+LOtAKZwawD4q6QApWhjAPSlngDNmZQA/ubjAPGakwC5eXMAuXRuAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ABgYGB0eHh0eHh0dDxgYGBgYGAoZEQMZHBwcHAEWGBgYGBgKCAAAHAkLFwkGFhgYGBgYCggACxwJABwGCxgQEBgYGAoNHBwZCwAZCwYWCQMQGBoKGREIBgAREQAJGAYLEBoNChkGAAARGQsADhgGABABBgoNGRkXEQsACRkYAAYQAQcKCQgHCwAACA0ZGAAGGgEJCg4LAAsGEREREBgACBABEQgSEg8KDxYdDxgABggBAQ0LAAANDQsADQoABggIAQEJEREREQsACAMdBgYGFBABBwcGCwALEQMODxAQEBAYAQMLAAAGBwgJAwoYGBgYGBgBAgICAgICAgIYGBgYGBjgD4u8wAdQ4MAHLADAAQAAwAAA3YAAAAAAAAAAAAAAAAAAAAAAAASwAAAQVAAAEFQAAAACAAEABwAfAACAP4rQKAAAABAAAAAgAAAAAQAgAAAAAABABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALl5c/+5dG7/uXRu/7l5c/+5eXP/uXRu/7l5c/+5eXP/qnh0/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK2Cfv/0pZ7/98K9//C0r//0pZ7/8ZqT//Gak//xmpP/8ZqT/8yin/+mcGv/AAAAAAAAAAAAAAAAAAAAAAAAAAC8iYT//NHN////////////8ZqT//fCvf/+7Ov/+Kuk//nJxf/33t3/pnBr/wAAAAAAAAAAAAAAAAAAAAAAAAAAvImE//nJxf//9PP//uzr//Gak//5ycX///////Gak//82db/9Ono/6Zwa//MrKn/zKyp/wAAAAAAAAAAAAAAALyJhP/4s63/8ZqT//Gak//0pZ7//uzr///08//0pZ7//uzr//fe3f+mcGv/98K9/+nGxP/MrKn/AAAAAM2ZlP+8iYT/9KWe//i6tf/5ycX//ubj///////4urX/+Lq1///////3wr3/pWhj//fe3f/06ej/zKyp/82ZlP/wtK//vImE//Slnv/+5uP////////08//4urX/9KWe///08///9PP/6Kyn/6VoY//+5uP///Tz/8ysqf/Mop///NnW/7yJhP/4s63/9KWe//Slnv/4s63/+Lq1///08///////98K9//Slnv+laGP///Tz//Tp6P/MrKn/zKKf//zRzf+8iYT/98K9//nJxf/82db//uzr////////9PP/+cnF//izrf/4q6T/pWhj///////82db/zKKf/8yin//3wr3/vImE/+isp//+7Ov///Tz//7s6//82db/98K9//i6tf/4urX/zKKf/6Zwa///9/f//NHN/8yin//Mop//+Lq1//nJxf+tgn7/rYJ+/62Cfv+tgn7/qnh0/6p4dP+qeHT/qnh0/6p4dP///////NnW//nJxf/Mop//zKKf//izrf/+7Ov////////39//4urX/+LOt//7s6///9PP/+Lq1/7yJhP//9/f/997d//zRzf/5ycX/zKKf/8yin//3wr3/+Lq1//i6tf/3wr3/+Lq1//7s6///////+cnF//C0r/+tgn7//NnW//zZ1v/82db/6cbE/8ysqf/Mop///NHN//zRzf/33t3//uzr///////06ej/98K9//C0r//orKf/qnh0/8ysqf/MrKn/zKyp/8ysqf8AAAAAzKKf/+e4tf//9PP///f3///08//33t3//NHN//nJxf/3wr3/57i1/7yJhP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADMop//u5aT/7uWk/+7lpP/u5aT/7uWk/+7lpP/u5aT/7uWk/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgD4u8wAdQ4MAHLADAAQAAwAAA3YAAAAAAAAAAAAAAAAAAAAAAAASwAAAQVAAAEFQAAAACAAEABwAfAACAP4rQ";
    var tagImg = "data:image/gif;base64,R0lGODlhEAAQAMQfAK2z+Ovs/9XZ/cbK+4WM2Z+m97q/+pOa6I6V6aOq+Le8+r7B8cHG+7W6+ZKa9p2k7b7D+rK394yS2amv9+Tn/6as7Jif7KGl3PT1/+jp893e8czP/IGI2PP0/////////yH5BAEAAB8ALAAAAAAQABAAAAVy4CeOZGmeaHoOTaRMcBKZkBFggQA1zXSUAANDEPB0GIAKpxQBFAoARcdjeCxJTopRUeh0lKVGQTHQKhSexXUEADgchUAnrpEAGZ2AY+BxCDJ2JBMbHn02CQN1JQkFCxEPCBYHBxeBJAgEHASZm5Yqn58hADs=";
    var items = new Array;
    items.push([subscribeLabel, subscribeImg, "googlereader_subscribe();"]);
    items.push("separator");
    for(var i=0; i<user_tags.length; i++)
    {
    	items.push([user_tags[i], tagImg, "googlereader_tag('"+user_tags[i]+"');"]);
    }
    items.push("separator");
    items.push([readerLabel, readerImg, "googlereader_reader();"]);
    var mPopup = document.createElement("menupopup");
    mPopup.setAttribute("onpopupshowing", "return this.parentNode.showDropDown(event);");
    mPopup.setAttribute("oncommand", "/*this.parentNode.goUp(event);*/ event.stopPropagation();");
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.showDropDown = function(e)
    {
    	var box = e.target;
    	var children = box.childNodes;
    	while(children[0])
    	{
    		try{ box.removeChild(children[0]); }
    		catch(e){}
    	}
    	for(var j = 0; j < items.length; j++)
    	{
    		if(items[j] == "separator")
    		{
    	 		if((i == 0 && j > 0) || (i != 0)) box.appendChild(document.createElement('menuseparator'));
    	 	}
    	 	else
    	 	{
    	 		var cmd = items[j] [2];
    	 		if(items[j] [2].indexOf('http://') >= 0 || items[j] [2].indexOf('https://') >= 0) 
    	 			cmd = "gBrowser.addTab('" + items[j] [2] + content.location.href + "');";
    	 		box.appendChild(this.genMenuitem(items[j] [0], items[j] [1], cmd + " event.stopPropagation();"));
    	 	}
    	}
    }
    this.genMenuitem = function(label, img, cmd)
    {
    	var m = document.createElement('menuitem');
    	m.setAttribute('label', label);
    	m.setAttribute('class', 'menuitem-iconic');
    	m.setAttribute('image', img);
    	m.setAttribute('oncommand', cmd);
    	m.tooltipText = label;
    	return m;
    }
    googlereader_tag = function(tag)
    {
    	gBrowser.selectedTab = gBrowser.loadURI("http://www.google.com/reader/view/user/"+user_id+"/label/"+tag);
    }
    googlereader_reader = function()
    {
    	gBrowser.selectedTab = gBrowser.loadURI("http://www.google.com/reader/");	
    }
    googlereader_subscribe = function()
    {
    	var w = getBrowser().contentWindow;
    	var b = w.document.body;
    	if(b)
    	{
    		void(z=w.document.createElement('script'));
    		void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');
    		void(b.appendChild(z));
    	}
    	else
    	{
    		w.document.location='http://www.google.com/reader/view/feed/'+encodeURIComponent(w.document.location.href)
    	}
    }
    //this.setAttribute("oncommand", "do_something();");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-reader-button-disturbedhr.html');

    Help Tab

  233. Google Reader Subscribe Button

    Code Tab

    /* ----------------------------------------------------------------
         Google Reader Subscribe Button
         by LouCypher (aka Zoolcar9)
         Based on Google Reader "Subscribe" bookmarklet
       ---------------------------------------------------------------- */
    this.subscribe(event, content.document, content.location);
    

    Initialization Tab

    function addURL(aEvent, aURL) {
      var url = "http://www.google.com/reader/view/feed/" + encodeURIComponent(aURL);
      openUILink(url, aEvent, false, true);
    }
    function getFeedURL(e, aDocument) {
      var j = e;
      var c = aDocument.location;
      if (e.indexOf("/") != 0) {
        var d = c.pathname.split("/");
        d[d.length - 1] = e;
        j = d.join("/")
      }
      return c.protocol + "//" + c.hostname + j;
    }
    function checkForFeeds(aEvent, aDocument) {
      var f = false;
      var m = aDocument.getElementsByTagName("link");
      for (var g = 0, a; a = m[g]; g++) {
        var h = a.getAttribute("type");
        var i = a.getAttribute("rel");
        if (h && h.match(/[\+\/]xml$/) && i && i == "alternate") {
          var b = a.getAttribute("href");
          if (b.indexOf("http") != 0) {
            b = getFeedURL(b, aDocument);
          }
          addURL(aEvent, b);
          f = true;
          break
        }
      }
      if (!f) alert("Oops. Can't find a feed.");
    }
    this.subscribe = function(aEvent, aDocument, aLocation) {
      var isFeed = aDocument.documentElement.id == "feedHandler";
      if (isFeed) {
        addURL(aEvent, aLocation.href);
      } else {
        checkForFeeds(aEvent, aDocument);
      }
    }
    this.setAttribute("onclick", "checkForMiddleClick(this, event);");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-reader-subscribe-button.html');
    this.tooltipText = "Subscribe to Google Reader";
    

    Help Tab

  234. Google Site Search

    Code Tab

    /* -------------------------------------------------------------
         Google Site Search
         Search for keywords on the site you are viewing,
         with search priority is as follow:
           * Selected text
           * Searchbar
           * Prompt for keywords
         Use middle click to open the search results in a new tab
         Works with Firefox 1.5, 2.0b, and Flock Beta searchbar
       ------------------------------------------------------------- */
    this.GoogleSiteSearch(event);
    

    Initialization Tab

    function getDomainList(aHostname, aArray) { //ripped from Stylish
      aArray[aArray.length] = aHostname;
      var firstDot = aHostname.indexOf(".");
      var lastDot = aHostname.lastIndexOf(".");
      if (firstDot != lastDot) {
        if (!isNaN(parseInt(aHostname.substring(lastDot + 1, aHostname.length)))) {
          return;
        }
        getDomainList(aHostname.substring(firstDot + 1, aHostname.length), aArray);
      }
    }
    function getSelectedText() {
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var string = winWrapper.getSelection().toString();
      if(string.match(/\s/)) string = "\"" + string + "\""; //optional: add quotation marks
      return string;
    }
    function getSearchBox() {
      var searchbar = document.getElementById("flock_searchbar") ||
                      document.getElementById("searchbar");
      if(!searchbar) return;
      var searchbox = searchbar.mTextbox || searchbar._textbox;
      var sEngine = searchbar._ss
                    ? searchbar._ss.currentEngine.name
                    : searchbar.tooltipText.replace(/^Search\s/, "");
      var sInput = searchbox.value.replace(/\sSearch$/, "") || searchbox.value;
      var sQuery;
      if(sEngine == sInput ||
        (searchbox.firstChild && searchbox.firstChild.src == "") ||
         searchbar.hasAttribute("empty")) sQuery = "";
      else sQuery = searchbox.value;
      return sQuery;
    }
    function getInput() {
      var p = prompt("Query:", "", "Google Site Search");
      return p;
    }
    this.checkForMiddleClick = function(aNode, aEvent) {
      if(aEvent.button == 1) {
        var fn = new Function("event", "this.GoogleSiteSearch(event)");
        fn.call(aNode, aEvent);
      }
    }
    this.GoogleSiteSearch = function(aEvent) {
      var scheme = content.location.protocol;
      if(!scheme.match(/ftp|https?/)) {
        alert("Cannot search from " + scheme.toUpperCase() + " protocol");
        return;
      }
      var domain = [];
      var domains = "";
      getDomainList(content.location.hostname, domain);
      var site = domain[0];
      for(var i = 0; i < domain.length; i++) {
        domains += domain[i];
        if(i != domain.length - 1) domains += ";";
      }
      var query = getSelectedText() || getSearchBox() || getInput();
      if(query) openUILink(
        "http://www.google.com/search?q=" + encodeURIComponent(query) +
        "&sitesearch=" + site + "&domains=" + domains +
        "&sourceid=firefox", aEvent, false, true
      );
    }
    this.tooltipText = "Find on this site";
    this.setAttribute("onclick", "this.checkForMiddleClick(this, event)");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-site-search.html');
    

    Help Tab

  235. Google Talk

    Code Tab

     

    Initialization Tab

     this.quot = function(evt) {
    var link="http://talkgadget.google.com/talkgadget/client";
    var label="gTalk";
    var head =(document.getElementById('sidebar-title').getAttribute('value') == label);
      switch(evt.button) {
    case 2:
    this.showPopup(this);
    return;
    case 0:
       if (!head) {
          openWebPanel();
          var sbLoc = document.getElementById('sidebar').contentDocument.location;
          sbLoc.href = link;
          document.getElementById('sidebar-title').value = label;
          document.getElementById('sidebar-box').hidden = false;
          document.getElementById('sidebar-box').collapsed = false;
          document.getElementById('sidebar-splitter').hidden = false;
          return;
       }
       if (head) {
          document.getElementById('sidebar-title').value = null;
          document.getElementById('sidebar-box').hidden = true;
          document.getElementById('sidebar-box').collapsed = true;
          document.getElementById('sidebar-splitter').hidden = true;
          toggleSidebar();
       }
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    this.tooltipText = 'Google Talk';
    this.setAttribute('author','LRodman');
    this.setAttribute('version','1.0alpha');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sidebarbutton-maker-several-example-sidebar-buttons.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    }

    Help Tab

  236. Google Text

    Code Tab

    //Just highlight text and then click on this button for a google search.
    //
    http://www.google.co.uk/search?hl=en&q=hello&btnG=Google+Search&meta=
    var addybit="http://www.google.co.uk/";
    var querybit="search\?hl\=en\&q\=";
    var lastbit="\&btnG\=Google\+Search\&meta\=";
    //MANY thanks to Zoolcar9 for this bit ;-)
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
    var str = winWrapper.getSelection().toString();
    str = escape(str);
    var build=addybit+ querybit + str + lastbit;
    const url = build;
     // window.open(url); 
    gBrowser.selectedTab = gBrowser.addTab(url);
    /* +============================================================
        U P D A T E   C H E C K   -   C O D E   T A B   S C R I P T
       ============================================================+ */
        if(this.getAttribute("checkdone") == "false")
        {
          this.checkforupdate();
        }
    /* +============================================================
        E N D   O F   U P D A T E   C H E C K   -  C O D E   T A B
       ============================================================+ */

    Initialization Tab

    /*Initialization code*/
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important; ");
    /* +============================================================
        U P D A T E   C H E C K   -   I N I T   T A B   V A R S
       ============================================================+ */
    var mycheckwindow = "";
    var postnumber = "";
    var mytarget = "";
    var currentversion = "";
    var alertstring = "";
    var buttonname = "";
    this.setAttribute("checkdone", "false");
    /* +=============================================================
        E N D   O F   U P D A T E   C H E C K   -   I N I T   V A R S
       =============================================================+ */
    /* +=================================================================
        U P D A T E   C H E C K   -   I N I T   T A B   F U N C T I O N S
       =================================================================+ */
    this.checkforupdate = function()
    {
      // Set checkdone to true so it runs first time only
      this.setAttribute("checkdone", "true");
      // grab the current version and name of the button
      currentversion = this.getAttribute("version");
      buttonname = this.getAttribute("label");
      // get the homepage post number and open a window for it
      var thishp = this.getAttribute("homepage");
      var postnostart = thishp.indexOf("#");
        if(postnostart == -1)
        {
          alertstring = "Script Error.\n\n";
          alertstring += "You have not used a homepage link with a post number in it."
          alertstring += "\n\n You need to use the URL generated after editing ";
          alertstring += "your button post,\nnot the URL that is a standard link.\n\n";
          alertstring += "It is of the form:-\n\n";
          alertstring += "http://custombuttons2.com/forum/viewtopic.php?f=60&t=832&p=2392#p2392";
          alert(alertstring);
          return;
        }
      postnumber = thishp.substr(postnostart + 1, thishp.length);
      // open a minimal window mostly out of sight
      mycheckwindow = window.open(thishp, "updatecheck","height=1,width=1,screenX=-400,screenY=-400,dialog=yes");
      // Give the focus back to the user
         mycheckwindow.blur();
      // Once the window is loaded - go get the version info
      mycheckwindow.onload = checkthepage();
    } // END of check for update
    function checkthepage()
    {
        // mycheckwindow.document.title = "Update check";
      // find the post element itself by ID from the homepage attribute
      mytarget = mycheckwindow.document.getElementById(postnumber);
        // keep this item for the scrollTo if poss. Then keep going.
        var myscroll = mytarget;
      // Wait for the page to completely render then step through...
      if(!mytarget)
      {
        // clear any existing time out
        if(waitforpage)
        {
          clearTimeout(waitforpage);
        }
        var waitforpage = setTimeout(function(){checkthepage()}, 1000);
      }
      else
      {
        clearTimeout(waitforpage);
        // step through DOM elements to the button link
        mytarget = mycheckwindow.document.getElementById(postnumber).firstChild.nextSibling.firstChild.nextSibling.nextSibling;
        mytarget = mytarget.firstChild;
        var mynextstep = mytarget.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling;
        mytarget = mynextstep.firstChild;
      // look for the link href - otherwise it's likely to be
      // an FF or CB2 compatibility icon. If so - step through...
        while(!mytarget.href)
        {
          mytarget = mytarget.nextSibling;
        }
      // We have the content of the button link code so lets call it a string
        var buttonstr = mytarget.href;
      // look for the button version text
        var verstart = buttonstr.indexOf("version%27%2C%27");
      // cut the front off after that text
        var firstcut = buttonstr.substring(verstart + 16, buttonstr.length);
      // look for the end of version bit
        var verend = firstcut.indexOf("%27%29%3B%0A");
      // cut all the tail end off
        var secondcut = firstcut.substring(0, verend);
      // rename to help us keep track
        var postedversion = secondcut;
      // compare the posted version and the current version
      //
      // (If you are not using standard button version notation you may
      //  need to change the following test from < to !== )
        if(currentversion < postedversion)
        {
          // use a confirm window. Resize the check window if user clicks OK
          // otherwise just close it on cancel
          alertstring = "There is a newer version of ";
          alertstring += buttonname + " available.\n\n";
          alertstring += "The new version number is " + postedversion + "\n\n";
          alertstring += "Your version is " + currentversion + "\n\n";
          alertstring += "Click on " + '"' + "OK" + '"' + " to open the ";
          alertstring += "button home page and download the update now.";
          if(confirm(alertstring))
          {
            mycheckwindow.resizeTo(370,110);
            mycheckwindow.title = "Update check";
            // calculate for scroll to
            var mydown = myscroll.offsetTop;
            var myinset = myscroll.offsetLeft;
            mycheckwindow.scrollTo(myinset,mydown);
            // calculate for centre of screen
            var myleft = screen.availWidth/2 - mycheckwindow.innerWidth/2;
            var mytop = screen.availHeight/2 - mycheckwindow.innerHeight/2;
            mycheckwindow.moveTo(myleft,mytop);
            mycheckwindow.focus();
          }
          else
          {
            mycheckwindow.close();
          }
        } // END of comparison 'true'
        else
        {
          // just close the window
          mycheckwindow.close();
        }
      } // end of mytarget else
    /*
      if(mycheckwindow)
      {
        mycheckwindow.close();
      }
    */
    } // END of check the page
    /* +=================================================================
        E N D   O F   U P D A T E   C H E C K   -   I N I T   F U N C S.
       =================================================================+ */
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','squeaky');
    this.setAttribute('version','20080417.2.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-highlighted-text-button.html');
    this.setAttribute('dependency','FF2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

  237. Google Text

    Code Tab

    //Just highlight text and then click on this button for a google search.
    //
    http://www.google.co.uk/search?hl=en&q=hello&btnG=Google+Search&meta=
    var addybit="http://www.google.co.uk/";
    var querybit="search\?hl\=en\&q\=";
    var lastbit="\&btnG\=Google\+Search\&meta\=";
    //MANY thanks to Zoolcar9 for this bit ;-)
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
    var str = winWrapper.getSelection().toString();
    str = escape(str);
    var build=addybit+ querybit + str + lastbit;
    const url = build;
     // window.open(url); 
    gBrowser.selectedTab = gBrowser.addTab(url);
    /* +============================================================
        U P D A T E   C H E C K   -   C O D E   T A B   S C R I P T
       ============================================================+ */
        if(this.getAttribute("checkdone") == "false")
        {
          this.checkforupdate();
        }
    /* +============================================================
        E N D   O F   U P D A T E   C H E C K   -  C O D E   T A B
       ============================================================+ */

    Initialization Tab

    /*Initialization code*/
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important; ");
    /* +============================================================
        U P D A T E   C H E C K   -   I N I T   T A B   V A R S
       ============================================================+ */
    var mycheckwindow = "";
    var postnumber = "";
    var mytarget = "";
    var currentversion = "";
    var alertstring = "";
    var buttonname = "";
    this.setAttribute("checkdone", "false");
    /* +=============================================================
        E N D   O F   U P D A T E   C H E C K   -   I N I T   V A R S
       =============================================================+ */
    /* +=================================================================
        U P D A T E   C H E C K   -   I N I T   T A B   F U N C T I O N S
       =================================================================+ */
    this.checkforupdate = function()
    {
      // Set checkdone to true so it runs first time only
      this.setAttribute("checkdone", "true");
      // grab the current version and name of the button
      currentversion = this.getAttribute("version");
      buttonname = this.getAttribute("label");
      // get the homepage post number and open a window for it
      var thishp = this.getAttribute("homepage");
      var postnostart = thishp.indexOf("#");
        if(postnostart == -1)
        {
          alertstring = "Script Error.\n\n";
          alertstring += "You have not used a homepage link with a post number in it."
          alertstring += "\n\n You need to use the URL generated after editing ";
          alertstring += "your button post,\nnot the URL that is a standard link.\n\n";
          alertstring += "It is of the form:-\n\n";
          alertstring += "http://custombuttons2.com/forum/viewtopic.php?f=60&t=832&p=2392#p2392";
          alert(alertstring);
          return;
        }
      postnumber = thishp.substr(postnostart + 1, thishp.length);
      // open a minimal window mostly out of sight
      mycheckwindow = window.open(thishp, "updatecheck","height=1,width=1,screenX=-400,screenY=-400,dialog=yes");
      // Give the focus back to the user
         mycheckwindow.blur();
      // Once the window is loaded - go get the version info
      mycheckwindow.onload = checkthepage();
    } // END of check for update
    function checkthepage()
    {
        // mycheckwindow.document.title = "Update check";
      // find the post element itself by ID from the homepage attribute
      mytarget = mycheckwindow.document.getElementById(postnumber);
        // keep this item for the scrollTo if poss. Then keep going.
        var myscroll = mytarget;
      // Wait for the page to completely render then step through...
      if(!mytarget)
      {
        // clear any existing time out
        if(waitforpage)
        {
          clearTimeout(waitforpage);
        }
        var waitforpage = setTimeout(function(){checkthepage()}, 1000);
      }
      else
      {
        clearTimeout(waitforpage);
        // step through DOM elements to the button link
        mytarget = mycheckwindow.document.getElementById(postnumber).firstChild.nextSibling.firstChild.nextSibling.nextSibling;
        mytarget = mytarget.firstChild;
        var mynextstep = mytarget.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling;
        mytarget = mynextstep.firstChild;
      // look for the link href - otherwise it's likely to be
      // an FF or CB2 compatibility icon. If so - step through...
        while(!mytarget.href)
        {
          mytarget = mytarget.nextSibling;
        }
      // We have the content of the button link code so lets call it a string
        var buttonstr = mytarget.href;
      // look for the button version text
        var verstart = buttonstr.indexOf("version%27%2C%27");
      // cut the front off after that text
        var firstcut = buttonstr.substring(verstart + 16, buttonstr.length);
      // look for the end of version bit
        var verend = firstcut.indexOf("%27%29%3B%0A");
      // cut all the tail end off
        var secondcut = firstcut.substring(0, verend);
      // rename to help us keep track
        var postedversion = secondcut;
      // compare the posted version and the current version
      //
      // (If you are not using standard button version notation you may
      //  need to change the following test from < to !== )
        if(currentversion < postedversion)
        {
          // use a confirm window. Resize the check window if user clicks OK
          // otherwise just close it on cancel
          alertstring = "There is a newer version of ";
          alertstring += buttonname + " available.\n\n";
          alertstring += "The new version number is " + postedversion + "\n\n";
          alertstring += "Your version is " + currentversion + "\n\n";
          alertstring += "Click on " + '"' + "OK" + '"' + " to open the ";
          alertstring += "button home page and download the update now.";
          if(confirm(alertstring))
          {
            mycheckwindow.resizeTo(370,110);
            mycheckwindow.title = "Update check";
            // calculate for scroll to
            var mydown = myscroll.offsetTop;
            var myinset = myscroll.offsetLeft;
            mycheckwindow.scrollTo(myinset,mydown);
            // calculate for centre of screen
            var myleft = screen.availWidth/2 - mycheckwindow.innerWidth/2;
            var mytop = screen.availHeight/2 - mycheckwindow.innerHeight/2;
            mycheckwindow.moveTo(myleft,mytop);
            mycheckwindow.focus();
          }
          else
          {
            mycheckwindow.close();
          }
        } // END of comparison 'true'
        else
        {
          // just close the window
          mycheckwindow.close();
        }
      } // end of mytarget else
    /*
      if(mycheckwindow)
      {
        mycheckwindow.close();
      }
    */
    } // END of check the page
    /* +=================================================================
        E N D   O F   U P D A T E   C H E C K   -   I N I T   F U N C S.
       =================================================================+ */
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','squeaky');
    this.setAttribute('version','20080417.2.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-highlighted-text-button.html');
    this.setAttribute('dependency','FF2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

  238. Google Translate Page

    Code Tab

    /*
    What languages can be translated?
    Currently, Google offers the following translation pairs: English to and from Arabic, Chinese (Traditional & Simplified), French, German, Italian, Korean, Japanese, Russian, Spanish, and Portuguese; and German to and from French; and Chinese (Simplified) to/from Chinese (Traditional). 
    */
    function TranslatePage(){
    	var service = "http://translate.google.com/translate?prev=/language_tools&u=";
    	var serviceDomain = "translate.google.com";
    	var targetURI = getWebNavigation().currentURI.spec;
    	// if we're already viewing a translated page, then just reload
    	if (targetURI.indexOf(serviceDomain) >= 0){
    	BrowserReload();
            }
    	else {
    	loadURI(encodeURI(service + targetURI));
    	}
    }
    TranslatePage();

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20071130');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-translate.html');
    this.setAttribute("dependency",'FF 2.0,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute("help",'0,*******************************************************\
    	\n\n L = Translate current page to english using Google\'s Translation Service\
    	\n       Currently Google offers the following language pairs:\
    \n                 # English to/from Arabic\
    \n                 # English to/from Chinese (Simplified)\
    \n                 # English to/from Chinese (Traditional)\
    \n                 # English to/from French\
    \n                 # English to/from German\
    \n                 # English to/from Italian\
    \n                 # English to/from Korean\
    \n                 # English to/from Japanese\
    \n                 # English to/from Russian\
    \n                 # English to/from Spanish\
    \n                 # English to and from Portuguese\
    \n                 # Chinese (Simplified) to/from Chinese (Traditional)\
    \n                 # German to and from French\
    	\n\n R = CB Context Menu');

    Help Tab

    *******************************************************	
     L = Translate current page to english using Google's Translation Service	
           Currently Google offers the following language pairs:
                     # English to/from Arabic
                     # English to/from Chinese (Simplified)
                     # English to/from Chinese (Traditional)
                     # English to/from French
                     # English to/from German
                     # English to/from Italian
                     # English to/from Korean
                     # English to/from Japanese
                     # English to/from Russian
                     # English to/from Spanish
                     # English to and from Portuguese
                     # Chinese (Simplified) to/from Chinese (Traditional)
                     # German to and from French	
     R = CB Context Menu
  239. Google Voice

    Code Tab

    /*Code*/

    Initialization Tab

        var label="Google Voice";
    this.leftclick   = function(evt) {
          var head =(document.getElementById('sidebar-title').getAttribute('value') == label);
          if (!head) {
            openWebPanel();
            var sbLoc = document.getElementById('sidebar').contentDocument.location;
            sbLoc.href = 'https://www.google.com/voice/m';
            document.getElementById('sidebar-box').hidden = false;
            document.getElementById('sidebar-title').value = label;
            document.getElementById('sidebar-box').collapsed = false;
            document.getElementById('sidebar-splitter').hidden = false;
            return;
          } else {
            toggleSidebar();
          }
    }
    this.midclick = function(evt) {
    	gBrowser.selectedTab = gBrowser.addTab('https://www.google.com/voice?ui=desktop');
    }
    this.smidclick = function(evt) {
    	gBrowser.addTab(link);
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-voice-sidebar.html');

    Help Tab

  240. Google-Gadgets-API

    Code Tab

     

    Initialization Tab

     this.quot = function(evt) {
    var link="http://groups.google.com/group/Google-Gadgets-API/feed/rss_v2_0_msgs.xml?num=20";
    var label="Google-Gadgets-API";
    var head =(document.getElementById('sidebar-title').getAttribute('value') == label);
      switch(evt.button) {
    case 2:
    this.showPopup(this);
    return;
    case 0:
       if (!head) {
          openWebPanel();
          var sbLoc = document.getElementById('sidebar').contentDocument.location;
          sbLoc.href = link;
          document.getElementById('sidebar-title').value = label;
          document.getElementById('sidebar-box').hidden = false;
          document.getElementById('sidebar-box').collapsed = false;
          document.getElementById('sidebar-splitter').hidden = false;
          return;
       }
       if (head) {
          document.getElementById('sidebar-title').value = null;
          document.getElementById('sidebar-box').hidden = true;
          document.getElementById('sidebar-box').collapsed = true;
          document.getElementById('sidebar-splitter').hidden = true;
          toggleSidebar();
       }
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    this.tooltipText = 'Google-Gadgets-API';
    this.setAttribute('author','LRodman');
    this.setAttribute('version','1.0alpha');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sidebarbutton-maker-several-example-sidebar-buttons.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    }

    Help Tab

  241. Google's Cache

    Code Tab

    /*
    Left clicking the button opens Google's cache of the current page in the current tab.
    Middle clicking the button opens Google's cache of the current page in a new tab.
    */
    

    Initialization Tab

    var gc = "http://www.google.com/search?q=cache:"
    this.leftclick = function(evt){
    	openUILink(gc + content.location);
    }
    this.midclick = function(evt){
    	gBrowser.selectedTab = gBrowser.addTab(gc + content.location);
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.style.opacity = '1.0';
    this.tooltipText = "L: Open Google cache of current page"+"\n"+"M: Open Google cache of current page in new tab";
    this.setAttribute('author','pqwoerituytrueiwoq');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-cache-button.html');
    this.setAttribute('dependency','');
    this.setAttribute('status','')
    this.setAttribute('public',true);

    Help Tab

    Left clicking the button opens Google's cache of the current page in the current tab.
    Middle clicking the button opens Google's cache of the current page in a new tab.
  242. Google's Cache

    Code Tab

    /*
    Left clicking the button opens Google's cache of the current page in the current tab.
    Middle clicking the button opens Google's cache of the current page in a new tab.
    */
    

    Initialization Tab

    var gc = "http://www.google.com/search?q=cache:"
    this.leftclick = function(evt){
    	openUILink(gc + content.location);
    }
    this.midclick = function(evt){
    	gBrowser.selectedTab = gBrowser.addTab(gc + content.location);
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.style.opacity = '1.0';
    this.tooltipText = "L: Open Google cache of current page"+"\n"+"M: Open Google cache of current page in new tab";
    this.setAttribute('author','pqwoerituytrueiwoq');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-cache-button.html');
    this.setAttribute('dependency','');
    this.setAttribute('status','')
    this.setAttribute('public',true);

    Help Tab

    Left clicking the button opens Google's cache of the current page in the current tab.
    Middle clicking the button opens Google's cache of the current page in a new tab.
  243. Google's Cache

    Code Tab

    /*
    Left clicking the button opens Google's cache of the current page in the current tab.
    Middle clicking the button opens Google's cache of the current page in a new tab.
    */
    

    Initialization Tab

    var gc = "http://www.google.com/search?q=cache:"
    this.leftclick = function(evt){
    	openUILink(gc + content.location);
    }
    this.midclick = function(evt){
    	gBrowser.selectedTab = gBrowser.addTab(gc + content.location);
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.style.opacity = '1.0';
    this.tooltipText = "L: Open Google cache of current page"+"\n"+"M: Open Google cache of current page in new tab";
    this.setAttribute('author','pqwoerituytrueiwoq');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-cache-button.html');
    this.setAttribute('dependency','');
    this.setAttribute('status','')
    this.setAttribute('public',true);

    Help Tab

    Left clicking the button opens Google's cache of the current page in the current tab.
    Middle clicking the button opens Google's cache of the current page in a new tab.
  244. Greasemonkey

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != "function") {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    let Msg = createMsg(this.label);
    let de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg("...")"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb = custombuttons;
    let Cb2q = Cb.gQuot;
    this.leftclick = function(evt)
    {
      openDialog('chrome://greasemonkey/content/manage.xul', 'manager', 'chrome, resizable, centerscreen, dialog=0, modal=0, close');
    };
    this.setAttribute("onclick","custombuttons.gQuot.mHandler( event, this )"); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = ".65";
    this.setAttribute("onmouseover","custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout","custombuttons.ButtonDim(event);");
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("context", "gm-status-popup");
    this.setAttribute("author","LouCypher");
    this.setAttribute("version","");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/greasemonkey-button.html');
    this.setAttribute("dependency","FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0.6*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    if(typeof GM_BrowserUI != "object") {
      let ext = "Greasemonkey";
      let err = ext + " extension is not installed or is disabled.";
      this.image = custombuttons.defaultImg();
      this.tooltipText += "\n\n" + err;
      this.disabled = true;
      this.style.opacity = '.25';
    }
    else {
      this.image = "chrome://greasemonkey/content/status_on.gif";
    }
    

    Help Tab

    No help set for
    <label> button
    custombuttons-button<id>
    
  245. Greasemonkey

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization code*/
    this.pref='greasemonkey.enabled';
    this.onImage='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAyVJREFUOMt1k0toXGUAhb//n5vMjDczmUeaO3nNdMYkTCKNpKGpUWzHYsSkGrALHwiufCDuFLFIwUUVBHeiIApZVCqFIii2LqymWk0nbcWWaGxompd53HQmkzQTO6+be38XWrSlnuXhHDiL78Ad9MEg4qPHcN3uv/8o7sMp9P962u2hDweRr3yNA9gAR57AqNhszxXZcb1M1FF8Bky+/RDy0Gkcwf/o48fplZJUscJAvkxPaQufEBz3u3lNKbKvn6J0xwXv9lJf7eHVconnKoKG1QKUyqBrcJeHSMXmSdvmGLB0OIW8ZcGbCcKRNoaDRt2QY9uYi+sULTCag/hqPGSXTDb/5NBbo7xzsyMADvYxqBQHat3cfc9996Z2pPbhQjrj356UdrFI98CQkrouJs78wPhP6ZPXNjCl5Mf3znFEi0AoFIu+EfB59jg38iTvf5CG1g5HOUruPhBWtrVFbcQQ0iVU8gFHLM4t7vfH3BTKzu6952a+02qhVnj1WFWNB6VpKmw0MrOSkacuT6s9yU5haVX8fPaC6m9NCMNoVJ6wQdmyhJB2k9tHnVaAG+bqxmIum421xaPCXxtQX42Nc3RkQuSyW5SkzfcXrxDsr+aZh3dR5a0Rl6cmKDrapuViUy5AZmYuc2IzX6Al3kJVwC8C1V61Z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4IQPodzqdRqfTsTKZDI2MjIiTkxPs7u7S7e0tOOc4Pj6GqqpYX1+HpmlUrVbBOe/JstxjAJ42Go1f7u7uYFkWQqEQ6bouHMcR4+PjMAxDBEEAwzBARJROpxEEAer1+s+tVqsuAUC73f5raWmpkMvlYuFwGOFwmKLRKCUSCcTjcUqlUshms8QYg6IouL6+vi2Xy19yzusyACiK4jHGBpxzVCoVnJ2dCUVR6OLiArIsAwDt7OyIiYkJMk0TROREIpFn3W4XEgBkMhkEQfCOJElv6LqOoaEhmp6ehmVZMAwD8XgcsiyT53moVqs4PT097ff739q2bUszMzN0fn7+TFXVP3q93qoQImZZFkZHR0H0fGeMMUiShEqlgv39/b/b7fYXl5eXewAgq6oKAKjVak88z3vc6/U+rtVq70ajUUtV1ZgkSeT7/lPbtpudTme/2+1+X6vVfgeAhYWF5wmLi4v/PVUSwGsA3mSMzWma9haARy9/Z25ujgDgH7jkWH58xN7+AAAAAElFTkSuQmCC';
    this.PS=Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
    this.setAttribute("onclick", "if (event.button==0) this.toggleStatus(); else if (event.button==1) GM_BrowserUI.manageMenuItemClicked();");
    this.setStatus=function() {
     var status = this.PS.getBoolPref(this.pref);
     if (status==true) {
      this.image=this.onImage;
      this.tooltipText="Greasemonkey enabled"
      this.setAttribute("context", "gm-status-popup");
     } else {
      this.image=this.offImage;
      this.tooltipText="Greasemonkey disabled"
      this.setAttribute("context", "custombuttons-contextpopup");
     }
    }
    this.ob={};
    this.ob.observe=this.setStatus.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setStatus();
    this.toggleStatus=function() {
     switch(this.PS.getBoolPref(this.pref)) {
      case true: this.PS.setBoolPref(this.pref,false); break;
      case false: this.PS.setBoolPref(this.pref,true); break;
     }
    }
    

    Help Tab

  246. Group of pages

    Code Tab

    /*Code*/
    gBrowser.addTab("http://custombuttons2.com");
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20071003.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/group-pages.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/%0A%0ALeft%20click%20opens%20pages%20in%20new%20tabs%0AAdd%20new%20lines%20to%20add%20pages%0A%0Acurrent%20tab%3A%20loadURI%28%22http%3A//custombuttons2.com%22%29%3B%0Anew%20focused%20tab%3A%20%20gBrowser.selectedTab%20%3DgBrowser.addTab%28%22http%3A//custombuttons2.com%22%29%3B%0Anew%20tab%3A%20%20gBrowser.addTab%28%22http%3A//custombuttons2.com%22%29%3B
  247. Group of pages for TB/Thunderbrowse

    Code Tab

    /*Code*/
    /* Left click opens pages in new tabs.
       To add more pages add more lines */
    tbrowser.loadURI("http://custombuttons2.com");
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20081108.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/group-pages.html');
    this.setAttribute('dependency','Thunderbrowse');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/%0A%0AThis%20button%20is%20intended%20for%20use%20in%20Thunderbird%20with%20the%0AThunderbrowse%20extension.%20https%3A//addons.mozilla.org/en-US/thunderbird/addon/5373%0A%0ALeft%20click%20opens%20pages%20in%20new%20tabs%0AAdd%20new%20lines%20to%20add%20pages%0A%0Aexample%3A%20%20current%20tab%0A%20%20%20%20%20%20%20%20%20%20tbrowser.loadURI%28%22http%3A//custombuttons2.com%22%29%3B%20%20%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20new%20tab%0A%20%20%20%20%20%20%20%20%20%20tbrowser.addTab%28%22http%3A//custombuttons2.com%22%29%3B
  248. Help Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='helpMenu',popupID="cb2mBar-"+menuName+num;
    document.getElementById(menuName).setAttribute('collapsed','true');
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      that.appendChild(mPop);
    }
    setTimeout(this.initBtn, 5000);
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 1);
      }
    }
    that.hideDropMarker();
    this.type="menu";
    this.setAttribute("class", "menu-iconic");
    // mouseovers
    this.setAttribute("onmouseover", "this.hideDropMarker();" );
    // button attributes
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081211.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    // make it part of the button group for menubar-menus
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  249. Highlight

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != "function") {
      alert("This Button requires the Custom Buttons2 Extension.");
      this.disable(true);
    }
    let Msg = createMsg(this.label);
    let de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg("...")"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2q = custombuttons.gQuot;
    this.leftclick = function(evt)
    {
      var count=0, text, dv;text=prompt("Highlight:", "");
      if(text==null || text.length==0)return;
      dv=content.document.defaultView;
      function searchWithinNode(node, te, len)
      {
        var pos, skip, spannode, middlebit, endbit, middleclone;
        skip=0;
        if( node.nodeType==3 ) {
          pos=node.data.toUpperCase().indexOf(te);
          if(pos>=0){
            spannode=document.createElement("SPAN");
            spannode.style.backgroundColor="yellow";middlebit=node.splitText(pos);
            endbit=middlebit.splitText(len);
            middleclone=middlebit.cloneNode(true);spannode.appendChild(middleclone);
            middlebit.parentNode.replaceChild(spannode,middlebit);
            ++count;
            skip=1;
          }
        }
        else if( node.nodeType==1&& node.childNodes && 
                 node.tagName.toUpperCase()!="SCRIPT" &&
                 node.tagName.toUpperCase!="STYLE") {
          for (var child=0; child < node.childNodes.length; ++child) {
            child=child+searchWithinNode(node.childNodes[child], te, len);
          }
        }
        return skip;
      }
      window.status="Searching for '"+text+"'...";
      searchWithinNode(content.document.body, text.toUpperCase(), text.length);
      window.status="Found "+count+" occurrence"+(count==1?"":"s")+" of '"+text+"'.";
    };
    this.rightclick = function(evt){
      BrowserReload();
    };
    this.setAttribute("onclick","custombuttons.gQuot.mHandler( event, this )"); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = ".65";
    this.setAttribute("onmouseover","custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout","custombuttons.ButtonDim(event);");
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author","cshkdx");
    this.setAttribute("version","20080125.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/highlight-button-group.html');
    this.setAttribute('dependency','Cb2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help set for
    <label> button
    custombuttons-button<id>
  250. Highlighter Temp w/ Color Select

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    let Cb = custombuttons;
    this.properties = {
      colors:{
        Yellow: "yellow",
        Green: "lightgreen",
        Blue: "lightblue",
        Red: "#FF6A6A"
      }
    };
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    this.Cb = custombuttons;
    this.innerHTML = "";
    /*----------------------- Custom Buttons2 Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.color = this.properties.colors.Yellow;
    let Cb2s = custombuttons.CbStr;
    this.leftclick   = function(evt)
    {
      let oBtn = evt.target
      this.innerHTML = this.innerHTML || content.document.body.innerHTML;
      var count=0, text, dv;text=prompt("Highlight:", "");
      if(text==null || text.length==0)return;
      dv=content.document.defaultView;
      function searchWithinNode(node, te, len)
      {
        var pos, skip, spannode, middlebit, endbit, middleclone;
        skip=0;
        if( node.nodeType==3 ) {
          pos=node.data.toUpperCase().indexOf(te);
          if(pos>=0){
            spannode=document.createElement("SPAN");
            spannode.style.backgroundColor=oBtn.color;middlebit=node.splitText(pos);
            endbit=middlebit.splitText(len);
            middleclone=middlebit.cloneNode(true);spannode.appendChild(middleclone);
            middlebit.parentNode.replaceChild(spannode,middlebit);
            ++count;
            skip=1;
          }
        }
        else if( node.nodeType==1&& node.childNodes && 
                 node.tagName.toUpperCase()!="SCRIPT" &&
                 node.tagName.toUpperCase!="STYLE") {
          for (var child=0; child < node.childNodes.length; ++child) {
            child=child+searchWithinNode(node.childNodes[child], te, len);
          }
        }
        return skip;
      }
      window.status="Searching for '"+text+"'...";
      searchWithinNode(content.document.body, text.toUpperCase(), text.length);
      window.status="Found "+count+" occurrence"+(count==1?"":"s")+" of '"+text+"'.";
    };
    this.midclick    = function(evt)
    {
      content.document.body.innerHTML = this.innerHTML || content.document.body.innerHTML;
      this.innerHTML = "";
      // BrowserReload();
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons2 Mouse Handler End ---------------------*/
    this.oItems = [];
    let itemsId = "";
    this.oItems = this.properties.colors;
    this.mObj = this.Cb.getCbContextObj(this);
    this.mtFunc = function(){};
    this.init = function (oBtn)
    {
      oBtn.mObj.listener = function(oBtn){oBtn.mtFunc();};
      oBtn.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in oBtn.oItems) {
        if (i == "Yellow") {
          nItem = new oBtn.mObj.getItem();
          nItem.id = "*" + i;
          nItem.label = "* " + i;                 // if the items are from an object
          // nItem.label = oBtn.oItems[i]; // if the items are from an array
          nItem.value = oBtn.oItems[i];
          nItem.checked = false;
          mItem = oBtn.mObj.insertBefore( nItem , oBtn.mObj.oMenu.lastChild);
          this.firstId = mItem.id;
          // oBtn.oItems[i].sItemId = mItem.id;
          mItem.setAttribute( 'oncommand','document.popupNode.openPrefs(event);' )  // this
          // mItem.setAttribute( 'type','checkbox')
          // mItem.setAttribute( 'checked',false)
          // mItem.setAttribute( 'autocheck',false )
          oBtn.mObj.getItem();
          nItem = oBtn.mObj.getItem();
          nItem.id = 'Note';
          this.separator = oBtn.mObj.insertBefore( nItem , oBtn.mObj.oMenu.lastChild);
        } // End if ( i == "Yellow" )
        nItem = new oBtn.mObj.getItem();
        nItem.id = i;
        nItem.label = i;                 // if the items are from an object
        // nItem.label = oBtn.oItems[i]; // if the items are from an array
        nItem.value = oBtn.oItems[i];
        nItem.checked = false;
        mItem = oBtn.mObj.insertBefore( nItem , oBtn.mObj.oMenu.lastChild);
        // oBtn.oItems[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.start(event);' )  // this
        // mItem.setAttribute( 'type','checkbox')
        // mItem.setAttribute( 'checked',false)
        // mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.oItems)
      oBtn.mObj.getItem();
      nItem = oBtn.mObj.getItem();
      nItem.id = 'Note';
      this.separator = oBtn.mObj.insertBefore( nItem , oBtn.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.start = function(aEvent) {
      let x = aEvent.target.value || this.properties.colors.Yellow;
      this.color  = x.toLowerCase()
      let item = document.getElementById(this.firstId);
      item.label = "* " + aEvent.target.label
      item.value = aEvent.target.value
    };
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);');
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);');
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20080127.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/highlight-button-group.html');
    this.setAttribute('dependency','FF 2.0.0.*,FL 1.0*, CB2 2.0.6*');
    this.setAttribute('status','Proto');
    this.setAttribute('public',true);
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  251. History Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='history-menu',popupID="cb2mBar-"+menuName+num;
    document.getElementById(menuName).setAttribute('collapsed','true');
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      that.appendChild(mPop);
    }
    setTimeout(this.initBtn, 5000);
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 1);
      }
    }
    that.hideDropMarker();
    this.type="menu";
    this.setAttribute("class", "menu-iconic");
    // mouseovers
    this.setAttribute("onmouseover", "this.hideDropMarker();" );
    // button attributes
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081211.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    // make it part of the button group for menubar-menus
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  252. Home

    Code Tab

    /*Code*/
    /* -------------------------------------------------------------
         Home Button Enhancement
         by LouCypher (aka Zoolcar9)
         Home Button with context menu. The context menu will show:
         - list of Home Page(s)
         - commands to set Home Page to current tab, all tabs,
           blank tab, or selected bookmark
       ------------------------------------------------------------- */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
                    .getService(Components.interfaces.nsIXULAppInfo);
    var is2b2 = appInfo.version == "2.0b2" || appInfo.version == "2.0";
    this.updateTooltip = function(aNode) {
      var homePage = gHomeButton.getHomePage();
      homePage = homePage.replace(/\|/g,', ');
      aNode.tooltipText = homePage;
    }
    this.popupShowing = function(aNode) {
      var urls, mItems, mItem;
      mItems = aNode.childNodes.length - 7;
      for(var i = 0; i < mItems; i++) {
        mItem = aNode.firstChild;
        aNode.removeChild(mItem);
      }
      urls = gHomeButton.getHomePage().split("|");
      for(var j = urls.length-1; j >= 0; j--) {
        mItem = document.createElement("menuitem");
        mItem.setAttribute("label", urls[j]);
        mItem.setAttribute("oncommand", "openUILink(this.label, event, false, true)");
        mItem.setAttribute("onclick", "checkForMiddleClick(this, event)");
        aNode.insertBefore(mItem, aNode.firstChild);
      }
    }
    this.setHomePage = function(aURL) {
      gPrefService.setCharPref(gHomeButton.prefDomain, aURL);
    }
    this.setHomePageToTab = function(aMultiple) {
      var url = "";
      if(aMultiple) {
        var l = gBrowser.browsers.length;
        for(var i = 0; i < l; i++) {
          if(i) url += "|";
          url += gBrowser.getBrowserAtIndex(i).webNavigation.currentURI.spec;
        }
      } else {
        url = gBrowser.webNavigation.currentURI.spec;
      }
      this.setHomePage(url);
    }
    this.setHomePageToBookmark = function() {
      var rv = is2b2
        ? { urls: null, names: null }
        : { url: null };
      selectBookmarks(rv);
      if(rv.urls && rv.names) this.setHomePage(rv.urls.join("|"));
      else if(rv.url) this.setHomePage(rv.url);
    }
    function selectBookmarks(aParams) {
      return openDialog("chrome://browser/content/bookmarks/selectBookmark.xul",
                        "", "modal, centerscreen, resizable", aParams);
    }
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
      var m = aNode.appendChild(document.createElement("menu"));
      m.setAttribute("label", "Custom Button");
      var mp = m.appendChild(document.createElement("menupopup"));
      copyMenuItems(mp, "custombuttons-contextpopup");
      aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    function addMenuItem(aNode, aLabel, aCommand) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("label", aLabel);
      mi.setAttribute("oncommand", aCommand);
    }
    var items = [
      { label: "Use Current Tab",
        command: "document.popupNode.setHomePageToTab()" },
      { label: "Use All Tabs",
        command: "document.popupNode.setHomePageToTab(true)" },
      { label: "Use Blank Tab",
        command: "document.popupNode.setHomePage('about:blank')" },
      { label: "Use Bookmarks",
        command: "document.popupNode.setHomePageToBookmark()" }
    ]
    var test = document.getElementById("cbContext-openHome");
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet");
    var popup = main.appendChild(document.createElement("popup"));
    popup.id = "cbContext-openHome";
    popup.setAttribute("onpopupshowing", "document.popupNode.popupShowing(this);");
    popup.appendChild(document.createElement("menuseparator"));
    for(var i = 0; i < items.length; i++) {
      addMenuItem(popup, items[i].label, items[i].command);
    }
    cloneCBContext(popup);
    this.setAttribute("context", popup.id);
    this.setAttribute("onclick", "BrowserHomeClick(event)");
    this.setAttribute("onmouseover", "this.updateTooltip(this)");
    this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, homeButtonObserver)");
    this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, homeButtonObserver)");
    this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, homeButtonObserver)");
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','20060818.04');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/home-button-enhancement.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

  253. Home²

    Code Tab

    /*
        Home² (a.k.a. Home Button Enhancement)
          Originally by LouCypher (a.k.a. Zoolcar9), updated to work with Firefox 3 by Rawny
            Basically this is a home button with a context menu. 
            Left click the button to load your home page(s).
            Right click the button to show the context menu.
            The context menu contains:
              - A list of your home page(s)
              - Items to set your home page to:
                  - The current tab
                  - All open tabs
                  - A blank tab
                  - A bookmark/the bookmarks in a bookmark folder (both selected through a dialogue)
                  - URL(s) from the clipboard (this accepts multiple URLs if they are seperated with | characters)
          Rawny ^^
    */
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var imgCurr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAU1JS7v8AmZiXqKirxMLF2djX5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMH56VQAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABJSURBVChTrcxBDoAgDETRGcHC/S9cpykaLVvfpsnPALzAP4FBX+WF8wh0TukswYgcaBIDTV5hBMO0L1hLfV2FfHx7wlgFZ7GFCwKcXMPAsFH9AAAAAElFTkSuQmCC";
    var imgAll = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAU1J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QB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABHSURBVChTrYxBDsAwCMPCurT/f3EHI0xae60vlqwA5gLOBAv8VRrThtOsrEAFGt5BTGQPPWAZg3/AK2myhzwuvtBVcC9s4QEatFyyhRQPqwAAAABJRU5ErkJggg==";
    var imgBlank = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb3Bxa3KPi4qKkZSvqKirt7i4nKnLr7nNscXRzbzJxMLF2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALGj63gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABVSURBVChTrY9LDoAwCAXrpwotD+5/2kprotS1s5xMXiAxpMNER+sksRtBGeYRMONJUOG651D4SD7XIEzBsgShgOAt1AE+QqFz4dG/Yvyn1kfrFvBLL1FCMUlGtzzyAAAAAElFTkSuQmCC";
    var imgBkmrk = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB5klEQVR4XqWTTWgTQRiGn8luTEJTtCn+kIoBFX8OUsWLVhIvRbz00PVkD1bBXkTwIngpCIo3K/QgKAi2iiC1RSRFitRDLqUihXpbK0ooRE0r5Gcb2ybbGTfFTUNCctAHXlhm9nuGmflGKKX4HwSAp3ehziJfHxI0wV1YLxcXxw8ymZFUY7AlbSbXgc3iYwGB+Vti5hSf8xucv9FBOivJON+FFUlxVWKvKQCsqTEFiIoAoFSOAvuve2o4RS37fCkW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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyCQWGwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACaSURBVChTTc/rEoIgEIZhOpcmWpQQBmq1y/1foX2LTtM7/IBnGA5qmibvPAYmkupGu+KU2NnHK0NtishoKEzdZUilQ9YWrV6gbZqm9L5/jzFgxyndUUs4hjl6AYNuABScU9sMJgMPUeCqtb7MQIMA1pUWYKKPwBlVC9A/4BYCbH475L38VOuDdCR5Rga/20v4X6ag5k93Ycl9ATZ1NHYSQjjrAAAAAElFTkSuQmCC";
    var imgPasteDis = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoL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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAn2X1wgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAB8SURBVChTXY/REsMgCARJgIvg/39vekfaaafri6wHqt33jRTcCGMVtXdHJEYEHF3VyxEyFptnXBHXRzwjEouLCd9L1O7uQkpAcC5h2M6v6F6QYH+kEuxZaQdvISOq6leoHuGECd3yL2iYOMnhkxgBdfhbdKc9n0bycfODF3FyIvGocUrbAAAAAElFTkSuQmCC";
    var imgCB = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnsK8UpK2sy6Cqqr6msLEaAAAAAAAAAAAAAAAAwbS3DtDGxs6jmZnajYeEvI+LhxcAAAAAAAAAAAAAAAAAAAAAqLGxBa+5ucymsbPwtsDCxcvQ1aDV1twUuauxFK+fpayklZn3jH+A/YuBf9OOh4QaAAAAAAAAAAAAAAAAAAAAAAAAAADX4OK7u8bI+rC5vPvJzdLx3NnesdbM0rO/r7XXlIGH/Yh3evuvo6Ljt6yqGAAAAAAAAAAAAAAAAAAAAAAAAAAA6/DysLTAxP+4wMX7y87T8e3r8Ozt5urt1MbM9rWhqPeeiI7p1MHDh9bGxwcAAAAAAAAAAAAAAAAAAAAAz9reBdvk6L2qtrz/tr3E/NHU2fno5+v37OXp99zO1Pi/q7L2pIuT6su2vGHIsLYCAAAAAAAAAAAAAAAAjJmfAaGvtCGptbuzmaWt+7S7w/vX2t/86Ofr++7o7Pzg0tj8vqiw+5B0ff6pj5Xamn+FKpBzegIAAAAAkpufAoqVmyWJlpyokp+m146aof+3vsX71Njd/eno7P3v5+z93s/W/begqP17XGb9clVd9H1iaL19ZmsyemhsApCZnSSIkpbHg4+VyYuXnumLmJ//qa63/tTX3f7z8vb+9O3x/eTV3P22nab9dlZg/l1BSPtgSE3ocl9ivoJwcyaWn6O9fIWKz4aRlqaTnqTEmaat/7K4wf/W2eD+8e/0/fDp7vrj09r4uqGr8oFkbfxpT1XmUTtAw2VSVsCSgYTDAAAAAAAAAAAAAAAAq7S6U7/IztG2vcT+2Nrg8+rn7fzp3+b43s3V6ragqdWxmKCqkXh/LQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NvigdHS2fDl3uf+3tDa/s+8xuzRu8RsAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjc4wvX193A5uLo/d/U2v7Wyc/Z1sbMEAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OPp2eDc4fLVy9H75dnfmwAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** CODE ***** //
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo);
    var is2b2 = appInfo.version == "2.0b2" || appInfo.version == "2.0";
    this.updateTooltip = function(aNode) {
      var homePage = gHomeButton.getHomePage();
      homePage = homePage.replace(/\|/g,', ');
      aNode.tooltipText = homePage;
    }
    this.popupShowing = function(aNode) {
      var urls, mItems, mItem;
      mItems = aNode.childNodes.length - 8;
      for(var i = 0; i < mItems; i++) {
        mItem = aNode.firstChild;
        aNode.removeChild(mItem);
      }
      urls = gHomeButton.getHomePage().split("|");
      for(var j = urls.length-1; j >= 0; j--) {
        mItem = document.createElement("menuitem");
        mItem.setAttribute("label", urls[j]);
        if (urls[j] == "about:blank")
          mItem.setAttribute("image", imgBlank);
        else
          mItem.setAttribute("image", "http://www.google.com/s2/favicons?domain="+(urls[j].split(/\/+/g)[1]));
        mItem.setAttribute("oncommand", "openUILink(this.label, event, false, true)");
        mItem.setAttribute("onclick", "checkForMiddleClick(this, event)");
        aNode.insertBefore(mItem, aNode.firstChild);
      }
      var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      aNode.lastChild.previousSibling.previousSibling.setAttribute("disabled", !pasteURL ? true : false);
      aNode.lastChild.previousSibling.previousSibling.setAttribute("image", !pasteURL ? imgPasteDis : imgPaste);
    }
    this.setHomePage = function(aURL) {
      gPrefService.setCharPref(gHomeButton.prefDomain, aURL);
    }
    this.setHomePageToTab = function(aMultiple) {
      var url = "";
      if(aMultiple) {
        var l = gBrowser.browsers.length;
        for(var i = 0; i < l; i++) {
          if(i) url += "|";
          url += gBrowser.getBrowserAtIndex(i).webNavigation.currentURI.spec;
        }
      } else {
        url = gBrowser.webNavigation.currentURI.spec;
      }
      this.setHomePage(url);
    }
    this.setHomePageToBookmark = function() {
      var rv = is2b2
        ? { urls: null, names: null }
        : { url: null };
      selectBookmarks(rv);
      if(rv.urls && rv.names) this.setHomePage(rv.urls.join("|"));
      else if(rv.url) this.setHomePage(rv.url);
    }
    this.setHomePageToClipboard = function() {
      url = readFromClipboard();
      this.setHomePage(url);
    }
    function selectBookmarks(aParams) {
      return openDialog("chrome://browser/content/preferences/selectBookmark.xul", "", "modal, centerscreen, resizable", aParams);
    }
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
      var m = aNode.appendChild(document.createElement("menu"));
      m.setAttribute("label", "Custom Button");
      m.setAttribute("image", imgCB);
      var mp = m.appendChild(document.createElement("menupopup"));
      copyMenuItems(mp, "custombuttons-contextpopup");
      aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    function addMenuItem(aNode, aLabel, aCommand, aImg) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("label", aLabel);
      mi.setAttribute("oncommand", aCommand);
      mi.setAttribute("type", "menuitem-iconic bookmark-item");
      mi.setAttribute("image", aImg);
    }
    var items = [
      { label: "Use Current Tab",
        command: "document.popupNode.setHomePageToTab()",
        image: imgCurr },
      { label: "Use All Tabs",
        command: "document.popupNode.setHomePageToTab(true)",
        image: imgAll },
      { label: "Use Blank Tab",
        command: "document.popupNode.setHomePage('about:blank')",
        image: imgBlank },
      { label: "Use Bookmarks",
        command: "document.popupNode.setHomePageToBookmark()",
        image: imgBkmrk },
      { label: "Use URL(s) From Clipboard",
        command: "document.popupNode.setHomePageToClipboard()",
        image: imgPaste }
    ]
    var test = document.getElementById("cbContext-openHome");
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet");
    var popup = main.appendChild(document.createElement("popup"));
    popup.id = "cbContext-openHome";
    popup.setAttribute("onpopupshowing", "document.popupNode.popupShowing(this);");
    popup.appendChild(document.createElement("menuseparator"));
    for(var i = 0; i < items.length; i++) {
      addMenuItem(popup, items[i].label, items[i].command, items[i].image);
    }
    cloneCBContext(popup);
    this.setAttribute("context", popup.id);
    this.setAttribute("onclick", "BrowserGoHome(event)");
    this.setAttribute("onmouseover", "this.updateTooltip(this)");
    this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, homeButtonObserver)");
    this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, homeButtonObserver)");
    this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, homeButtonObserver)");
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','LouCypher, Rawny');
    this.setAttribute('version','8 (2008-12-18)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/home2.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Basically this is a home button with a context menu. 
    Left click the button to load your home page(s).
    Right click the button to show the context menu.
    The context menu contains:
      - A list of your home page(s)
      - Items to set your home page to:
          - The current tab
          - All open tabs
          - A blank tab
          - A bookmark/the bookmarks in a bookmark folder (both selected through a dialogue)
          - URL(s) from the clipboard (this accepts multiple URLs if they are seperated with | characters)
  254. Home²

    Code Tab

    /*
        Home² (a.k.a. Home Button Enhancement)
          Originally by LouCypher (a.k.a. Zoolcar9), updated to work with Firefox 3 by Rawny
            Basically this is a home button with a context menu. 
            Left click the button to load your home page(s).
            Right click the button to show the context menu.
            The context menu contains:
              - A list of your home page(s)
              - Items to set your home page to:
                  - The current tab
                  - All open tabs
                  - A blank tab
                  - A bookmark/the bookmarks in a bookmark folder (both selected through a dialogue)
                  - URL(s) from the clipboard (this accepts multiple URLs if they are seperated with | characters)
          Rawny ^^
    */
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var imgCurr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAU1JS7v8AmZiXqKirxMLF2djX5ejw+Pv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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABJSURBVChTrcxBDoAgDETRGcHC/S9cpykaLVvfpsnPALzAP4FBX+WF8wh0TukswYgcaBIDTV5hBMO0L1hLfV2FfHx7wlgFZ7GFCwKcXMPAsFH9AAAAAElFTkSuQmCC";
    var imgAll = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAU1JSmZiXqKirxMLF2djX5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARPiRPAAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABHSURBVChTrYxBDsAwCMPCurT/f3EHI0xae60vlqwA5gLOBAv8VRrThtOsrEAFGt5BTGQPPWAZg3/AK2myhzwuvtBVcC9s4QEatFyyhRQPqwAAAABJRU5ErkJggg==";
    var imgBlank = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb3Bxa3KPi4qKkZSvqKirt7i4nKnLr7nNscXRzbzJxMLF2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALGj63gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABVSURBVChTrY9LDoAwCAXrpwotD+5/2kprotS1s5xMXiAxpMNER+sksRtBGeYRMONJUOG651D4SD7XIEzBsgShgOAt1AE+QqFz4dG/Yvyn1kfrFvBLL1FCMUlGtzzyAAAAAElFTkSuQmCC";
    var imgBkmrk = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB5klEQVR4XqWTTWgTQRiGn8luTEJTtCn+kIoBFX8OUsWLVhIvRbz00PVkD1bBXkTwIngpCIo3K/QgKAi2iiC1RSRFitRDLqUihXpbK0ooRE0r5Gcb2ybbGTfFTUNCctAHXlhm9nuGmflGKKX4HwSAp3ehziJfHxI0wV1YLxcXxw8ymZFUY7AlbSbXgc3iYwGB+Vti5hSf8xucv9FBOivJON+FFUlxVWKvKQCsqTEFiIoAoFSOAvuve2o4RS37fCkW1zugtIoQokcpFdcBjIFv1FK7Lb+VpPNVL/0nk7yLU0Gv/dnl0sc1fuQVmYJkxcn19BBnjkdoefMY2IOLxz2DEwFBEEgXJDNpe2sSCKocRihOS3eYK9tfABIXnQbEfj3n6M9JNG+JbbrG7uheYJ3TUZhpe0nuk/fe9GXfNVG+xtL4AeowR7HNQbRYGI+vfh17STI7NG/pNOJIP6Ktk+zEOXZEQ45Ew8VasJl++nXRGJORiiCRSFAP7AxdxDs/Quv+VlyW5/I8+MBDA9CdrgprvtHvNODJ1S8cPiuxzQK5rE17RCPo3SASZFd1T/c0yvAFf375tqbe9pG61cXE+z4KyZsedfcUcad2U9A0swMs3enmWfXY/S5GHsWYA3/gn56zEKIdsIDiH+Jh7NtUVIDVAAAAAElFTkSuQmCC";
    var imgPaste = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb4mSnFIxoVYNoG0znXBSnHVw620L4XMwrY4zn4xxp6t07JIP5Y8s77Aw3ZNP369v57BR89Aw8NBQ8tFw+vNP+fFxmZiXkZSvpKeTqKirt7i4kZbKnKnLr7nNrsuzscXR3bGQ1Lax4s+x2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyCQWGwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACaSURBVChTTc/rEoIgEIZhOpcmWpQQBmq1y/1foX2LTtM7/IBnGA5qmibvPAYmkupGu+KU2NnHK0NtishoKEzdZUilQ9YWrV6gbZqm9L5/jzFgxyndUUs4hjl6AYNuABScU9sMJgMPUeCqtb7MQIMA1pUWYKKPwBlVC9A/4BYCbH475L38VOuDdCR5Rga/20v4X6ag5k93Ycl9ATZ1NHYSQjjrAAAAAElFTkSuQmCC";
    var imgPasteDis = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb3BxlnqMi4qKmZiXqKirt7i4sNXPxMLF2djX5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAn2X1wgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAB8SURBVChTXY/REsMgCARJgIvg/39vekfaaafri6wHqt33jRTcCGMVtXdHJEYEHF3VyxEyFptnXBHXRzwjEouLCd9L1O7uQkpAcC5h2M6v6F6QYH+kEuxZaQdvISOq6leoHuGECd3yL2iYOMnhkxgBdfhbdKc9n0bycfODF3FyIvGocUrbAAAAAElFTkSuQmCC";
    var imgCB = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbA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AAAAA5OPp2eDc4fLVy9H75dnfmwAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** CODE ***** //
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo);
    var is2b2 = appInfo.version == "2.0b2" || appInfo.version == "2.0";
    this.updateTooltip = function(aNode) {
      var homePage = gHomeButton.getHomePage();
      homePage = homePage.replace(/\|/g,', ');
      aNode.tooltipText = homePage;
    }
    this.popupShowing = function(aNode) {
      var urls, mItems, mItem;
      mItems = aNode.childNodes.length - 8;
      for(var i = 0; i < mItems; i++) {
        mItem = aNode.firstChild;
        aNode.removeChild(mItem);
      }
      urls = gHomeButton.getHomePage().split("|");
      for(var j = urls.length-1; j >= 0; j--) {
        mItem = document.createElement("menuitem");
        mItem.setAttribute("label", urls[j]);
        if (urls[j] == "about:blank")
          mItem.setAttribute("image", imgBlank);
        else
          mItem.setAttribute("image", "http://www.google.com/s2/favicons?domain="+(urls[j].split(/\/+/g)[1]));
        mItem.setAttribute("oncommand", "openUILink(this.label, event, false, true)");
        mItem.setAttribute("onclick", "checkForMiddleClick(this, event)");
        aNode.insertBefore(mItem, aNode.firstChild);
      }
      var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      aNode.lastChild.previousSibling.previousSibling.setAttribute("disabled", !pasteURL ? true : false);
      aNode.lastChild.previousSibling.previousSibling.setAttribute("image", !pasteURL ? imgPasteDis : imgPaste);
    }
    this.setHomePage = function(aURL) {
      gPrefService.setCharPref(gHomeButton.prefDomain, aURL);
    }
    this.setHomePageToTab = function(aMultiple) {
      var url = "";
      if(aMultiple) {
        var l = gBrowser.browsers.length;
        for(var i = 0; i < l; i++) {
          if(i) url += "|";
          url += gBrowser.getBrowserAtIndex(i).webNavigation.currentURI.spec;
        }
      } else {
        url = gBrowser.webNavigation.currentURI.spec;
      }
      this.setHomePage(url);
    }
    this.setHomePageToBookmark = function() {
      var rv = is2b2
        ? { urls: null, names: null }
        : { url: null };
      selectBookmarks(rv);
      if(rv.urls && rv.names) this.setHomePage(rv.urls.join("|"));
      else if(rv.url) this.setHomePage(rv.url);
    }
    this.setHomePageToClipboard = function() {
      url = readFromClipboard();
      this.setHomePage(url);
    }
    function selectBookmarks(aParams) {
      return openDialog("chrome://browser/content/preferences/selectBookmark.xul", "", "modal, centerscreen, resizable", aParams);
    }
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
      var m = aNode.appendChild(document.createElement("menu"));
      m.setAttribute("label", "Custom Button");
      m.setAttribute("image", imgCB);
      var mp = m.appendChild(document.createElement("menupopup"));
      copyMenuItems(mp, "custombuttons-contextpopup");
      aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    function addMenuItem(aNode, aLabel, aCommand, aImg) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("label", aLabel);
      mi.setAttribute("oncommand", aCommand);
      mi.setAttribute("type", "menuitem-iconic bookmark-item");
      mi.setAttribute("image", aImg);
    }
    var items = [
      { label: "Use Current Tab",
        command: "document.popupNode.setHomePageToTab()",
        image: imgCurr },
      { label: "Use All Tabs",
        command: "document.popupNode.setHomePageToTab(true)",
        image: imgAll },
      { label: "Use Blank Tab",
        command: "document.popupNode.setHomePage('about:blank')",
        image: imgBlank },
      { label: "Use Bookmarks",
        command: "document.popupNode.setHomePageToBookmark()",
        image: imgBkmrk },
      { label: "Use URL(s) From Clipboard",
        command: "document.popupNode.setHomePageToClipboard()",
        image: imgPaste }
    ]
    var test = document.getElementById("cbContext-openHome");
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet");
    var popup = main.appendChild(document.createElement("popup"));
    popup.id = "cbContext-openHome";
    popup.setAttribute("onpopupshowing", "document.popupNode.popupShowing(this);");
    popup.appendChild(document.createElement("menuseparator"));
    for(var i = 0; i < items.length; i++) {
      addMenuItem(popup, items[i].label, items[i].command, items[i].image);
    }
    cloneCBContext(popup);
    this.setAttribute("context", popup.id);
    this.setAttribute("onclick", "BrowserGoHome(event)");
    this.setAttribute("onmouseover", "this.updateTooltip(this)");
    this.setAttribute("ondragover", "nsDragAndDrop.dragOver(event, homeButtonObserver)");
    this.setAttribute("ondragdrop", "nsDragAndDrop.drop(event, homeButtonObserver)");
    this.setAttribute("ondragexit", "nsDragAndDrop.dragExit(event, homeButtonObserver)");
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','LouCypher, Rawny');
    this.setAttribute('version','8 (2008-12-18)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/home2.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Basically this is a home button with a context menu. 
    Left click the button to load your home page(s).
    Right click the button to show the context menu.
    The context menu contains:
      - A list of your home page(s)
      - Items to set your home page to:
          - The current tab
          - All open tabs
          - A blank tab
          - A bookmark/the bookmarks in a bookmark folder (both selected through a dialogue)
          - URL(s) from the clipboard (this accepts multiple URLs if they are seperated with | characters)
  255. Hover Links GM Script Refresher

    Code Tab

    this.go();

    Initialization Tab

    /*Initialization Code*/
    // Originally a GM Script, modified to work as a Custom Button by nicholas.
    // original code at http://userscripts.org/scripts/review/28708
    // ==UserScript==
    // @name          Hover Links
    // @namespace     http://www.userscripts.org
    // @description   A tooltip pops up when hovering over links.
    // @include       *
    // ==/UserScript==
    var bg_color = "#EAEAEA";
    var border_color = "#D5D5D5";
    var font_color = "#000000";
    var font_face = "tahoma";
    var font_size = "11px";
    this.go = function() {
      function locate(event) {
        var posx, posy;
        var d = find_window();
        posx = event.clientX + window.content.scrollX;
        posy = event.clientY + window.content.scrollY;
        d.style.top = (posy + 5) + "px";
        d.style.left = (posx + 23) + "px";
      }
      function find_window() {
        return content.document.getElementById("link_tt");
      }
      function create_window(id) {
        var tt_div = content.document.createElement("div");
        tt_div.setAttribute("id", "link_tt");
        tt_div.setAttribute("style", "background:" + bg_color + ";border:1px solid " + border_color + ";padding:2px;color:" + font_color + ";font-family:" + font_face + ";font-size:" + font_size + ";position:absolute;z-index:1000;");
        var tt_url = content.document.createTextNode(id.href);
        tt_div.appendChild(tt_url);
        content.document.body.appendChild(tt_div);
      }
      function kill_window() {
        if (find_window()) find_window().parentNode.removeChild(find_window());
      }
      function create_event(id) {	
        id.addEventListener("mouseover", function() { create_window(id); }, false);
        id.addEventListener("mouseout", function() { kill_window(); }, false);
        id.addEventListener("mousemove", function(event) { locate(event); }, true);
      }
      var link = content.document.getElementsByTagName("a");
      for (i = 0; i < link.length; i++) {
        create_event(link[i]);
      }
    }
    var self = this;
    custombuttons.listeners.hoverlinksgmscriptload = document.getElementById("content");
    custombuttons.listeners.hoverlinksgmscriptload.addEventListener("load", self.go, true);
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080420.00');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/hover-links.html');

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  256. IE5.5.Ran with IEs4Linux

    Code Tab

    /*CODE*/
    var page = gBrowser.currentURI;
    var browser = "/home/nicholas/.ies4linux/bin/ie55";
    var file =  Components.classes["@mozilla.org/file/local;1"]
                          .createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath(browser);
    var process = Components.classes["@mozilla.org/process/util;1"]
                            .createInstance(Components.interfaces.nsIProcess);
    process.init(file);
    process.run(false, [page.spec], 1);
    return true;
    

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-buttons-linux.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button launches the current page in IE5.5
    It works on the linux operating system.
  257. IE6.Ran with IEs4Linux

    Code Tab

    /*CODE*/
    var page = gBrowser.currentURI;
    var browser = "/home/nicholas/.ies4linux/bin/ie6";
    var file =  Components.classes["@mozilla.org/file/local;1"]
                          .createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath(browser);
    var process = Components.classes["@mozilla.org/process/util;1"]
                            .createInstance(Components.interfaces.nsIProcess);
    process.init(file);
    process.run(false, [page.spec], 1);
    return true;
    

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-buttons-linux.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button launches the current page in IE6
    It works on the linux operating system.
  258. IE7.Ran with IEs4Linux

    Code Tab

    /*CODE*/
    var page = gBrowser.currentURI;
    var browser = "/home/nicholas/.ies4linux/bin/ie7";
    var file =  Components.classes["@mozilla.org/file/local;1"]
                          .createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath(browser);
    var process = Components.classes["@mozilla.org/process/util;1"]
                            .createInstance(Components.interfaces.nsIProcess);
    process.init(file);
    process.run(false, [page.spec], 1);
    return true;
    

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-buttons-linux.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button launches the current page in IE7
    It works on the linux operating system.
  259. Image²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\n [im'+'g=Clipboard]Highlighted[/im'+'g]';
    // This is for Cb2.com/forum/indev.php
    this.ss = [
      { label: 'BBCode'  , open: '[im'+'g]'                            , open1: '[im'+'g%e%c]%h'                          , close: '[/im'+'g]', sItemId: '' },
      { label: 'HTML'    , open: '<im'+'g src="%c" title="%h" alt="%h"', open1: '<im'+'g src="%c" title="%h" alt="%h"', close: '>'        , sItemId: '' },
      { label: 'WIKI N/A', open: ''                                    , open1: ''                                    , close: ''         , sItemId: '' }];
    // This is for Standard BBCode behavior.
    /* Comment out the previous declaration and substitute this one.
    this.ss = [
      { label: 'BBCode', open: '[im'+'g]', open1: '[im'+'g="%c"]%h', close: '[/im'+'g]' },
      { label: 'HTML', open: '<im'+'g src="%c" title="%h" alt="%h"', open1: '<im'+'g src="%c" title="%h" alt="%h"', close: '>' }];
    */
    var sPromptString = 'Clipboard is empty.\nCopy the link.';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      initMeth  : function( oBtn ){
            this.index  = Number(Cb.getPref( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          x.text += x.listo.replace(/%e/,'').replace(/%c/,'').replace(/%h/g, '');
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked=true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.n += x.liste.replace(/%e/,'=').replace(/%c/,'%h').replace(/%h/g,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos + nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro
      if (!x.cBoard) {
        alert('Middle-click expects the Clipboard to contain the Author\'s name.\n\n'+this.info );
        return;
      }
      x.n += x.liste.replace(/%e/,'=').replace(/%c/,x.cBoard).replace(/%h/g, (x.Highlight) ? x.Highlight : x.cBoard)+ x.listc;
      var nLen = x.n.length;
      x.text += x.n;
      x.theBox.value = x.text + x.eBlock;
      x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPref( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPref(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPref("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-link-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    **********************************************************	
     L = IF text is highlighted:
    		 BBCode: [img]Highlighted[/img]	
    		 HTML: <img src="Highlighted" title="Highlighted" alt="Highlighted">	
    	 OR nothing highlighted
    		 First click = [img] or <img src="" title="" alt=""	
    		 Second click = [/img] or >	
     M = 
    		 BBCode: [img%c]%h[/img]	
    		 HTML: <img src="%c" title="%h|%c" alt="%h|%c">	
    	     Where %c = Clipboard Contents = (image URL)
                       %h = Highlighted
     R = Context Menu with tag options and submenu for CB Context
  260. Import a Button²

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.Cb = custombuttons;
    /*------------------------- Button Code Block Start --------------------------*/
    /**  execute( clip )
     Scope:		global
     Args:		clip -
     Returns:	Nothing
     Called by:	1. onclick & ondrop
     Purpose: 	1. clone a button on the parent toolbar to the right of this button
     TODO:		1.
    **/
    this.execute = function( uri ) //{{{
    {
      var oRet = this.Cb.oSplitButtonURI( uri );
      if ( typeof oRet == CB2const.OBJECT) {
        custombuttons.setWmNewButtonParameters( this, oRet, 0 );
      } // End if ( typeof oRet == CB2const.OBJECT
    }; //}}} End Function this.execute( clip )
    /**  getSupportedFlavours(  )
     Scope:		private
     Args:
     Returns:	flavours
     Called by:	1. ???
     Purpose: 	1. Establish the proper text flavor
     TODO:		1.
    **/
    this.getSupportedFlavours = function(  ) //{{{
    {
      var flavours = new FlavourSet();
      flavours.appendFlavour('text/unicode');
      return flavours;
    }; //}}} End Function this.getSupportedFlavours(  )
    // Empty function onDragOver(e,f,s)
    this.onDragOver = function(e,f,s){}
    /**  onDrop( event, dDat, session )
     Scope:		private
     Args:		event -
        dDat -
        session -
     Returns:	Nothing
     Called by:	1. Mouse drop event.
     Purpose: 	1. Fire this.execute on a button drop.
     TODO:		1.
    **/
    this.onDrop = function( event, dDat, session ) //{{{
    {
      this.execute(dDat.data.split('\n')[0]);
    }; //}}} End Function this.onDrop( event, dDat, session )
    this.setAttribute('oncommand', 'this.execute(gClipboard.read());');
    this.setAttribute('ondragover','nsDragAndDrop.dragOver(event,this);');
    this.setAttribute('ondragdrop','nsDragAndDrop.drop(event,this);');
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author', "deepakjoshi04, SCClockDr" );
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('dependency', "FF2.0*, FL1.0*, TB2.0*, CB2 2.0*" );
    this.setAttribute('version', "20090209.01" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/import-button2.html');
    // this.tooltipText = this.label + "";
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    To use:
    1. Copy link to clipboard.
    2. LeftClick on this Button.
     OR
    3. Drag the link & drop it on this button
     OR For button code
    4. Block copy the code.
    5. Drag & drop or LeftClick this button.
  261. InFormEnter

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    function fileName()
    {
    		var dir = Components.classes["@mozilla.org/file/directory_service;1"]
    		           .getService(Components.interfaces.nsIProperties)
    		           .get("ProfD", Components.interfaces.nsIFile);
    		dir.append("custombuttons");
    		if (!dir.exists()) {
    			try{
    				dir.create(0x01, 0755);
    			} catch(e){
    				var msg='Custom Buttons error.]'
    					+'[ Event: Creating custombuttons directory]'
    					+'[ '+e;
    				Components.utils.reportError(msg);
    			}
    		}
    	return dir.path;
    }
    function writeFile( sFilePath, sFileContent )
    {
      try
      {
        sFilePath=sFilePath.replace(/\//g,'\\');
    alert(sFilePath);
        var file = Components.classes["@mozilla.org/file/local;1"]
                      .createInstance(Components.interfaces.nsILocalFile);
        file.QueryInterface(Components.interfaces.nsIFile);
        file.initWithPath( sFilePath );
        if( file.exists() == true ) file.remove( false );
        var strm = Components.classes["@mozilla.org/network/file-output-stream;1"]
                      .createInstance(Components.interfaces.nsIFileOutputStream);
        strm.QueryInterface(Components.interfaces.nsIOutputStream);
        strm.QueryInterface(Components.interfaces.nsISeekableStream);
        strm.init( file, 0x04 | 0x08, 420, 0 );
        strm.write( sFileContent, sFileContent.length );
        strm.flush();
        strm.close();
      }
      catch(ex)
      {
        window.alert(ex.message);
      }
    }
    function readFile(sFilePath) {
        sFilePath=sFilePath.replace(/\//g,'\\');
    	try {
    		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    	} catch (e) {
    		alert("Permission to read file was denied.");
    	}
    	var file = Components.classes["@mozilla.org/file/local;1"]
    		.createInstance(Components.interfaces.nsILocalFile);
    	file.initWithPath( sFilePath);
    	if ( file.exists() == false ) {
    	writeFile(sFilePath,"");
    	}
    	var is = Components.classes["@mozilla.org/network/file-input-stream;1"]
    		.createInstance( Components.interfaces.nsIFileInputStream );
    	is.init( file,0x01, 00004, null);
    	var sis = Components.classes["@mozilla.org/scriptableinputstream;1"]
    		.createInstance( Components.interfaces.nsIScriptableInputStream );
    	sis.init( is );
    	var output = sis.read( sis.available() );
    	return output;
    }
    var mp;
    removeNode=function(aNode)
    {
    	mp.removeChild(aNode);
    	reAssignId();
    }
    function reAssignId()
    {
    	var NL=mp.childNodes;
    	for(var i=0;i<NL.length;i++)
    	{
    		mp.removeChild(NL[i].id=i+1);
    	}
    }
    function addMenuItem(aNode, aLabel, aContextId, aCommand) {
     if (aLabel =='separator'){
      aNode.appendChild(document.createElement('menuseparator'));
     }else{
      var mi = aNode.appendChild(document.createElement("menuitem"));
       mi.setAttribute("label", aLabel);
       mi.setAttribute("value", aLabel);
       mi.setAttribute("id",aNode.childNodes.length);
      if(aContextId) mi.setAttribute("context", aContextId);
      if(aCommand) mi.setAttribute("oncommand", aCommand);
    }
    }
    var contextId = "popup-item-clipping";
    var test = document.getElementById(contextId);
    if(test) test.parentNode.removeChild(test);
    var mainPopup = document.getElementById("mainPopupSet");
    var context = mainPopup.appendChild(document.createElement("popup"));
    context.id = contextId;
    addMenuItem(context, "Remove Item?", null,
      "closeMenus(document.popupNode); " +
      "removeNode(document.popupNode);");
    var filePath=fileName()+"/InFormEnter.txt";
      var data=readFile(filePath);
    	var popupItems=data.split('\n');
    mp = document.createElement("menupopup");
    addMenuItem(mp, "Save", null,"save()");
    addMenuItem(mp,'separator',null,null);
    mp.setAttribute("oncommand", "paste(event.target.label)");
    for(var i = 0; i < popupItems.length; i++) {
    	popupItems[i].replace(/\\s/g,'');
    if(popupItems[i].length>1)
      addMenuItem(mp, popupItems[i], contextId);
    }
    function getData()
    {
    	var NL=mp.childNodes;
    	var data="";
    	for(var i=2;i<NL.length;i++)
    	{
    		data=data+NL[i].value+"\n";
    	}
    	return data;
    }
    this.execute=function(evt)
    {
    	if(evt.target.value==-1)
    	addMenuItem(mp,readFromClipboard(),contextId);
    }
    save=function()
    {
    writeFile(filePath,getData())
    }
    paste=function(text)
    {
    var theBox = document.commandDispatcher.focusedElement;
    var theBox = document.commandDispatcher.focusedElement;
    var startPos = theBox.selectionStart;
    var endPos = theBox.selectionEnd;
    var oPosition = theBox.scrollTop;
    var oHeight = theBox.scrollHeight;
    text=theBox.value.substring(0,startPos)+text;
    var nHeight = theBox.scrollHeight - oHeight;
    text +=theBox.value.substring(endPos, theBox.value.length);
    theBox.value = text;
    theBox.selectionStart = startPos + str.length;
    theBox.selectionEnd = startPos + str.length;
    theBox.scrollTop = oPosition + nHeight;
    }
    this.getSupportedFlavours = function () {
        var flavours = new FlavourSet();
        flavours.appendFlavour("text/unicode");
        return flavours;
      }
     this.onDragOver = function(e,f,s){}
      this.onDrop = function(event,dDat,session){
    addMenuItem(mp,dDat.data.split('\n')[0],contextId)
      }
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    this.tooltipText = this.label;
    this.appendChild(mp);
    this.value=-1;
    this.type = "menu-button";
    this.setAttribute("oncommand", "this.execute(event);");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/informenter.html');

    Help Tab

  262. InFormEnter

    Code Tab

    /*Code*/

    Initialization Tab

    function fileName()
    {
    		var dir = Components.classes["@mozilla.org/file/directory_service;1"]
    		           .getService(Components.interfaces.nsIProperties)
    		           .get("ProfD", Components.interfaces.nsIFile);
    		dir.append("custombuttons");
    		if (!dir.exists()) {
    			try{
    				dir.create(0x01, 0755);
    			} catch(e){
    				var msg='Custom Buttons error.]'
    					+'[ Event: Creating custombuttons directory]'
    					+'[ '+e;
    				Components.utils.reportError(msg);
    			}
    		}
    	return dir.path;
    }
    function writeFile( sFilePath, sFileContent )
    {
      try
      {
        sFilePath=sFilePath.replace(/\//g,'\\');
    alert(sFilePath);
        var file = Components.classes["@mozilla.org/file/local;1"]
                      .createInstance(Components.interfaces.nsILocalFile);
        file.QueryInterface(Components.interfaces.nsIFile);
        file.initWithPath( sFilePath );
        if( file.exists() == true ) file.remove( false );
        var strm = Components.classes["@mozilla.org/network/file-output-stream;1"]
                      .createInstance(Components.interfaces.nsIFileOutputStream);
        strm.QueryInterface(Components.interfaces.nsIOutputStream);
        strm.QueryInterface(Components.interfaces.nsISeekableStream);
        strm.init( file, 0x04 | 0x08, 420, 0 );
        strm.write( sFileContent, sFileContent.length );
        strm.flush();
        strm.close();
      }
      catch(ex)
      {
        window.alert(ex.message);
      }
    }
    function readFile(sFilePath) {
        sFilePath=sFilePath.replace(/\//g,'\\');
    	try {
    		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    	} catch (e) {
    		alert("Permission to read file was denied.");
    	}
    	var file = Components.classes["@mozilla.org/file/local;1"]
    		.createInstance(Components.interfaces.nsILocalFile);
    	file.initWithPath( sFilePath);
    	if ( file.exists() == false ) {
    	writeFile(sFilePath,"");
    	}
    	var is = Components.classes["@mozilla.org/network/file-input-stream;1"]
    		.createInstance( Components.interfaces.nsIFileInputStream );
    	is.init( file,0x01, 00004, null);
    	var sis = Components.classes["@mozilla.org/scriptableinputstream;1"]
    		.createInstance( Components.interfaces.nsIScriptableInputStream );
    	sis.init( is );
    	var output = sis.read( sis.available() );
    	return output;
    }
    var mp;
    removeNode=function(aNode)
    {
    	mp.removeChild(aNode);
    	reAssignId();
    }
    function reAssignId()
    {
    	var NL=mp.childNodes;
    	for(var i=0;i<NL.length;i++)
    	{
    		mp.removeChild(NL[i].id=i+1);
    	}
    }
    function addMenuItem(aNode, aLabel, aContextId, aCommand) {
       var mi = aNode.appendChild(document.createElement("menuitem"));
       mi.setAttribute("label", aLabel);
       mi.setAttribute("value", aLabel);
       mi.setAttribute("id",aNode.childNodes.length);
      if(aContextId) mi.setAttribute("context", aContextId);
      if(aCommand) mi.setAttribute("oncommand", aCommand);
    }
    var contextId = "popup-item-clipping";
    var test = document.getElementById(contextId);
    if(test) test.parentNode.removeChild(test);
    var mainPopup = document.getElementById("mainPopupSet");
    var context = mainPopup.appendChild(document.createElement("popup"));
    context.id = contextId;
    addMenuItem(context, "Remove Item?", null,
      "closeMenus(document.popupNode); " +
      "removeNode(document.popupNode);");
    var filePath=fileName()+"/InFormEnter.txt";
      var data=readFile(filePath);
    	var popupItems=data.split('\n');
    mp = document.createElement("menupopup");
    addMenuItem(mp, "Save", null,"save()");
    mp.setAttribute("oncommand", "paste(event.target.label)");
    for(var i = 0; i < popupItems.length; i++) {
    	popupItems[i].replace(/\\s/g,'');
    if(popupItems[i].length>1)
      addMenuItem(mp, popupItems[i], contextId);
    }
    function getData()
    {
    	var NL=mp.childNodes;
    	var data="";
    	for(var i=1;i<NL.length;i++)
    	{
    		data=data+NL[i].value+"\n";
    	}
    	return data;
    }
    this.execute=function(evt)
    {
    	if(evt.target.value==-1)
    	addMenuItem(mp,readFromClipboard(),contextId);
    }
    save=function()
    {
    writeFile(filePath,getData())
    }
    paste=function(text)
    {
    var theBox = document.commandDispatcher.focusedElement;
    var theBox = document.commandDispatcher.focusedElement;
    var startPos = theBox.selectionStart;
    var endPos = theBox.selectionEnd;
    var oPosition = theBox.scrollTop;
    var oHeight = theBox.scrollHeight;
    text=theBox.value.substring(0,startPos)+text;
    var nHeight = theBox.scrollHeight - oHeight;
    text +=theBox.value.substring(endPos, theBox.value.length);
    theBox.value = text;
    theBox.selectionStart = startPos + str.length;
    theBox.selectionEnd = startPos + str.length;
    theBox.scrollTop = oPosition + nHeight;
    }
    this.getSupportedFlavours = function () {
        var flavours = new FlavourSet();
        flavours.appendFlavour("text/unicode");
        return flavours;
      }
     this.onDragOver = function(e,f,s){}
      this.onDrop = function(event,dDat,session){
    addMenuItem(mp,dDat.data.split('\n')[0],contextId)
      }
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    this.tooltipText = this.label;
    this.appendChild(mp);
    this.value=-1;
    this.type = "menu-button";
    this.setAttribute("oncommand", "this.execute(event);");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/your-clipboard-button-fill-forms.html');

    Help Tab

  263. Insert ² button

    Code Tab

    /*
      Left click the button to insert a ² character at the cursor's position.
      Middle click the button to copy a ² character to the clipboard.
      Rawny ^^
    */
    

    Initialization Tab

    /* I've seen similar functions to insert/"paste" text in several buttons in the DB, including "Custom Buttons² Forum Emoticons" by nicholas, which the following function is copied from). */
    this.pasteItem= function(value) {
      var theBox = document.commandDispatcher.focusedElement;
      var startPos = theBox.selectionStart;
      var endPos = theBox.selectionEnd;
      var oPosition = theBox.scrollTop;
      var oHeight = theBox.scrollHeight;
      var text=theBox.value.substring(0,startPos);
      var nHeight = theBox.scrollHeight - oHeight;
      var str = value;
      text +=str;
      text +=theBox.value.substring(endPos, theBox.value.length);
      theBox.value = text;
      theBox.selectionStart = startPos + str.length;
      theBox.selectionEnd = startPos + str.length;
      theBox.scrollTop = oPosition + nHeight;
    }
    this.leftclick = function(evt)
    {
      // Insert a ² character at the cursor's position using the "pasteItem" function
      this.pasteItem("²");
    }
    this.midclick = function(evt)
    {
      // Copy a ² character to the clipboard
      gClipboard.write("²");
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    // ***** ATTRIBUTES ***** //
    this.tooltipText = "L: Insert ² character"+"\n"+"M: Copy ² to clipboard";
    this.setAttribute('author','rawny, nicholas');
    this.setAttribute('version','2 (2009-04-22)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/insert-2-button.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, FF1.5*, FL2.0*, TB2.0*, CB2 3.0.*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to insert a ² character at the cursor's position.
    Middle click the button to copy a ² character to the clipboard.
  264. Insert ² button

    Code Tab

    /*
      Left click the button to insert a ² character at the cursor's position.
      Middle click the button to copy a ² character to the clipboard.
      Rawny ^^
    */
    

    Initialization Tab

    /* I've seen similar functions to insert/"paste" text in several buttons in the DB, including "Custom Buttons² Forum Emoticons" by nicholas, which the following function is copied from). */
    this.pasteItem= function(value) {
      var theBox = document.commandDispatcher.focusedElement;
      var startPos = theBox.selectionStart;
      var endPos = theBox.selectionEnd;
      var oPosition = theBox.scrollTop;
      var oHeight = theBox.scrollHeight;
      var text=theBox.value.substring(0,startPos);
      var nHeight = theBox.scrollHeight - oHeight;
      var str = value;
      text +=str;
      text +=theBox.value.substring(endPos, theBox.value.length);
      theBox.value = text;
      theBox.selectionStart = startPos + str.length;
      theBox.selectionEnd = startPos + str.length;
      theBox.scrollTop = oPosition + nHeight;
    }
    this.leftclick = function(evt)
    {
      // Insert a ² character at the cursor's position using the "pasteItem" function
      this.pasteItem("²");
    }
    this.midclick = function(evt)
    {
      // Copy a ² character to the clipboard
      gClipboard.write("²");
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    // ***** ATTRIBUTES ***** //
    this.tooltipText = "L: Insert ² character"+"\n"+"M: Copy ² to clipboard";
    this.setAttribute('author','rawny, nicholas');
    this.setAttribute('version','2 (2009-04-22)');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/insert-2-button.html');
    this.setAttribute('dependency','FF3.0*, FF2.0*, FF1.5*, FL2.0*, TB2.0*, CB2 3.0.*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to insert a ² character at the cursor's position.
    Middle click the button to copy a ² character to the clipboard.
  265. Insert String

    Code Tab

    /*CODE*/
    // This is essentially a single item version of deepakjoshi04's Custom forum Tags button
    // found at http://custombuttons.phpbbnow.com/viewtopic.php?t=233#659
    var open="PLACE TEXT STRING THAT ONE WANTS TO INSERT HERE";
    var theBox = document.commandDispatcher.focusedElement;
    var startPos = theBox.selectionStart;
    var endPos = theBox.selectionEnd;
    var selectionLen = endPos - startPos
    var oPosition = theBox.scrollTop;
    var oHeight = theBox.scrollHeight;
    var text=theBox.value.substring(0,startPos);                // This grabs the first portion of the text box.
    var nHeight = theBox.scrollHeight - oHeight;
    text +=open;                                                // This inserts the desired string.
    text +=theBox.value.substring(endPos, theBox.value.length); // This appends the remaining text within the text box.
    theBox.value = text;                                        // This places the new text back into the text box.
    theBox.selectionStart = endPos + open.length;
    theBox.selectionEnd = endPos + open.length - selectionLen;
    theBox.scrollTop = oPosition + nHeight;                     // These last 3 statments properly place the cursor.
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author", "SCClockDr, cblover, deepakjoshi04, m435tr0d" );
    this.setAttribute('version','20090214.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/insert-string.html');
    this.setAttribute('dependency','Fx 2.0.0.4 - 3.2a1pre, Tb 2.0.0.19 - Tb 3.0b2pre, Calendar 1.0pre , CB2 2.0.0*');
    this.setAttribute("status","Complete");
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    **************************************************
     Left Click =
        Inserts the specified string at the cursor within a textarea.
    
  266. Insert tab button

    Code Tab

    this.pasteItem("\t");
    

    Initialization Tab

    /* I've seen similar functions to paste text in several buttons in the DB, including "Custom Buttons² Forum Emoticons" by nicholas, which the following function is copied from). */
    this.pasteItem= function(value) {
      var theBox = document.commandDispatcher.focusedElement;
      var startPos = theBox.selectionStart;
      var endPos = theBox.selectionEnd;
      var oPosition = theBox.scrollTop;
      var oHeight = theBox.scrollHeight;
      var text=theBox.value.substring(0,startPos);
      var nHeight = theBox.scrollHeight - oHeight;
      var str = value;
      text +=str;
      text +=theBox.value.substring(endPos, theBox.value.length);
      theBox.value = text;
      theBox.selectionStart = startPos + str.length;
      theBox.selectionEnd = startPos + str.length;
      theBox.scrollTop = oPosition + nHeight;
    }
    // ***** ATTRIBUTES ***** //
    this.tooltipText = "Insert tab character";
    this.setAttribute('author','Rawny, nicholas');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/insert-tab-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Click the button to insert a tab character at the cursor's position.
  267. Insert tab button

    Code Tab

    this.pasteItem("\t");
    

    Initialization Tab

    /* I've seen similar functions to paste text in several buttons in the DB, including "Custom Buttons² Forum Emoticons" by nicholas, which the following function is copied from). */
    this.pasteItem= function(value) {
      var theBox = document.commandDispatcher.focusedElement;
      var startPos = theBox.selectionStart;
      var endPos = theBox.selectionEnd;
      var oPosition = theBox.scrollTop;
      var oHeight = theBox.scrollHeight;
      var text=theBox.value.substring(0,startPos);
      var nHeight = theBox.scrollHeight - oHeight;
      var str = value;
      text +=str;
      text +=theBox.value.substring(endPos, theBox.value.length);
      theBox.value = text;
      theBox.selectionStart = startPos + str.length;
      theBox.selectionEnd = startPos + str.length;
      theBox.scrollTop = oPosition + nHeight;
    }
    // ***** ATTRIBUTES ***** //
    this.tooltipText = "Insert tab character";
    this.setAttribute('author','Rawny, nicholas');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/insert-tab-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Click the button to insert a tab character at the cursor's position.
  268. iPhone Emulator

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    this.leftclick = function(evt) {
    var bgImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYEAAALYCAYAAACaME6GAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9gEGhMHDzkDs6YAACAASURBVHja7L3nl2XXVfb7m2vtfVLl1FXVXZ2UZUtykBPG2DJgjMGI5IRfwIZ7x4UBvC+8/8H9I94P9wN33PvtEmywLQfAtgi2bCwrtFInqVN1d1VXV04n7rXW/TDX3mdXdbWwAWODe48hWzp1zs5rhmc+85kCBO5sd7Y724/tJiIMDQ0xMT5OkqZ0u12azSadTgfnXPGdENRUWGsREQCSJMFaSwiBEAIiQqVSwRhDt9slyzLSNAWg1+vR6/UwxgDgnMM5hzGm2Idzrth3frz8+M45siwrPisfE9jzt9ttxhiMMXjv8d7fefhAcucW3NnubD/eW5qmPPTQQ8wdPkq9McCRuWM0mzu0O22C94gI1lo1mgLWJhgRrLFUqlWMNYgRJASMsVQqKZVKhVarSa+XUalUSJKUdqdNr9fFmtzgZ2Q9h7HqBEBwLsOIAVEnYaxBEMQIWXQiZSfgvUeMwYiwvr7O4uIivV6XSrXGQKOB9x5rExoDDaqVCs3mLu1WG2sMO7s7vHL6NNevX/+xdgh3nMCd7c72Y751u126nQ4ra2u4zSZzJx+k2khIqp6kYgmABPAhEAgYBBHBGIMIhKBwgjGCGEMvCD4z2MogJB5jLVhDPa0ygBAQnFOjG3xAxGCsISD4LAMjCOBcD0EwxoKNmUjoZwb5iYUARoTxQ3Mc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2rHYCIVxCn0FLTiMkrwmDz7OLwSSLvWsiZ6LLZTpTcj+TomH6Uxntj9HxRleVUYmRIieOjSqoosYjwhJYku4SwEhEGPdNExmMyajKdOTESfHJ0wmM6pZTai8zvBYal9z7+497m3f+/rE069jEjh79MqSZ599jqWlJWIl1TJEAAABnElEQVSIzKoZVSXkjrEy8TkcLrKwNGQ4XGRxcYHFhQUWFgcUZUmvLLCFnVv+nQ3c5hwkaQNQ8oxJbqLRZ7wzCXnUeYaQ43ScW1odchvQBiHOyEGTcqK70EOULglyOOO+GdslOblam3PinXeUbGtHMp+QXEKTbj3GDmFNnBtqNgo3xDPLZ1wKkllFk0z0NZGm7ErXw1+DS2h3y8acjFrDsXRvopK83UVXJjtwpvuUfGTNnHSVjkFdzHcq6epbC2qb4ZxOgjAtHp2DZZqNSDMaHZO7hIGnwGlpA3nMKiabq/J8HRWZsSaDPHmIrfUxTCRTe2etnV/3kEln0u/OsZOuC5HJfktkDkQuXpqCd6qoak3dgiZZo4ox07GQTgOVFkMMPgsOgnY/reRXk0E0bRGTxAnpvNJMhRZH8YwaLD1neRo+SgCXhzyp2FLbIPBpE9uELF23zrgEkWBXVcVsOuX0dMx0MmU8nlBXNfVsJnJu66SbqGbs7++zu7v7tYyffy+SwNPj6fH0eHo8PX5N3vXpJXh6PD2eHk+Pf7jH/wFYp+AJtvpUdAAAAABJRU5ErkJggg==";
    var appcontentVbox=document.getElementById("appcontent"), contentTabbrowser=document.getElementById("content"), cb=custombuttons, num=cb.getNumber(this.id), sPref="iPhone"+num+".", hPref=sPref+"height", wPref=sPref+"width", uaPref="general.useragent.override", uaOPref=sPref+"override", tBarPref="browser.tabs.forceHide", browser=document.getElementById("browser");
    if (!cb.isPref(uaPref)) {
      var oHeight = window.getComputedStyle(appcontentVbox, null).getPropertyValue("height");
      var oWidth = window.getComputedStyle(appcontentVbox, null).getPropertyValue("width");
      cb.setPrefs(hPref, oHeight);
      cb.setPrefs(wPref, oWidth);
      appcontentVbox.setAttribute('style', 'background-image: url('+bgImg+'); background-repeat: no-repeat;');
      appcontentVbox.style.width = 385;
      appcontentVbox.style.height = 726;
      appcontentVbox.style.maxwidth = 385;
      appcontentVbox.style.maxheight = 726;
      appcontentVbox.flex = 0;
      browser.style.background = "black";
      contentTabbrowser.style.width = "320px";
      contentTabbrowser.style.height = "356px";
      contentTabbrowser.style.margin = "214px 34px 34px 34px";
      contentTabbrowser.flex = 0;
      gBrowser.setStripVisibilityTo(false);
      cb.setPrefs(tBarPref, true);
      if (cb.isPref(uaPref)) cb.setPrefs(uaOPref, cb.getPrefs(uaPref));
      //the next line doesn't work for creating a pref as you think it would
      //cb.setPrefs(uaPref,'Mobile Safari 1.1.3 - iPhone');
      var prefBranch = Components.classes["@mozilla.org/preferences-service;1"].
                       getService(Components.interfaces.nsIPrefBranch);
      prefBranch.setCharPref(uaPref,'Mobile Safari 1.1.3 - iPhone');
      // half second delay for reloading page, for those really fast sites.
      setTimeout("loadURI(content.document.location.href)", 500);
      this.checked = true;
    } else {
      wPref = cb.getPrefs(wPref);
      hPref = cb.getPrefs(hPref);
      appcontentVbox.removeAttribute('style');
      appcontentVbox.style.width = wPref;
      appcontentVbox.style.height = hPref;
      appcontentVbox.style.maxwidth = 'none';
      appcontentVbox.style.maxheight = 'none';
      appcontentVbox.flex = 1;
      browser.style.background = "transparent";
      contentTabbrowser.removeAttribute('style');
      contentTabbrowser.style.width = wPref;
      contentTabbrowser.style.height = hPref;
      contentTabbrowser.style.margin = "0px";
      contentTabbrowser.flex = 1;
      gBrowser.setStripVisibilityTo(true);
      cb.setPrefs(tBarPref, false);
      if (cb.isPref(uaOPref)) {
        cb.setPrefs(uaPref, cb.getPrefs(uaOPref));
        cb.clearPrefs(uaOPref);
      }
      else {
        cb.clearPrefs(uaPref);
      }
      // half second delay for reloading page, for those really fast sites.
      setTimeout("loadURI(content.document.location.href)", 500);
      this.checked = false;
    }
    };
    this.tooltipText = this.label + "\nClick to toggle current page in iPhone";
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20090923.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/iphone-emulator.html');
    this.setAttribute('dependency','FF3.0*, FL1.0*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Toggles the Useragent between Default and Mobile Safari 1.1.3 - iPhone
    Then refreshes current page and displays it in an iPhone.
  269. Italic

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    this.info = '\n\nBBCode: [i]Clipboard[/i]\n\nHTML: <i>Clipboard</i>';
    this.ss = [
    	{ label: 'BBCode', open: '[i]', open1: '[i]%h', close: '[/i]', sItemId: '' },
    	{ label: 'HTML'  , open: '<i>', open1: '<i>%h', close: '</i>', sItemId: '' },
            { label: 'WIKI'  , open: '*'  , open1: '*%h'  , close: '*'   , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
    	index 		: 0,
    	listo 		: '',
    	liste 		: '',
    	listc		: '',
    	theBox		: {},
    	startPos 	: 0,
    	endPos 		: 0,
    	oPosition 	: 0,
    	oHeight 	: 0,
    	text		: '',
    	nHeight		: 0,
    	Highlight	: '',
    	eBlock		: '',
    	cBoard		: '',
    	n		: '',
    	initMeth	: function( oBtn ){
    				this.index	= Number(Cb.getPrefs( prefstring ));
    				this.listo 	= oBtn.ss[this.index].open;
    				this.liste 	= oBtn.ss[this.index].open1;
    				this.listc	= oBtn.ss[this.index].close;
    				this.theBox	= document.commandDispatcher.focusedElement;
    				if ( this.theBox ) {
    					this.startPos 	= this.theBox.selectionStart;
    					this.endPos 	= this.theBox.selectionEnd;
    					this.oPosition 	= this.theBox.scrollTop;
    					this.oHeight 	= this.theBox.scrollHeight;
    					this.text	= this.theBox.value.substring(0,this.startPos);
    					this.nHeight	= this.theBox.scrollHeight - this.oHeight;
    					this.Highlight	= this.theBox.value.substring(this.startPos, this.endPos);
    					this.eBlock	= this.theBox.value.substring(this.endPos, this.theBox.value.length);
    					this.cBoard	= gClipboard.read();
    					this.n		= '';
    					return true;
    				} // End if ( this.theBox )
    				return false;
    			} // End initMeth
    };
    this.doLeft = function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.Highlight) {	// THEBOX CONTAINS NOTHING HIGHLITED.
    		switch(this.pref){
    		case 1:
    			x.text += x.listc + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=0;
    			this.checked=false;
    			break;
    		case 0:
    			x.text += x.listo;
    			x.text += x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=1;
    			this.checked=true;
    			break;
    		}
    	} else {	// THEBOX CONTAINS SOMETHING HIGHLITED.
    		x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
    		var nLen = x.n.length;
    		x.text += x.n + x.eBlock;
    		x.theBox.value = x.text;
    		x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    		x.theBox.scrollTop = x.oPosition + x.nHeight;
    	}
    }; // End this.doLeft*/
    this.doMid= function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.cBoard) {
    		alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
    		return;
    	}
    	x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
    	var nLen = x.n.length;
    	x.text += x.n;
    	x.theBox.value = x.text + x.eBlock;
    	x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    	x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
    	let ssIdx = Cb.getPrefs( prefstring ,0);
    	let aNodes = this.mObj.getItemsById( 'Note' );
    	for( let i = 0; i < aNodes.length; i++ ) {
    		aNodes[i].setAttribute( "checked", false );
    	}
    	aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
    	Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
    	x.mObj.listener = function(x){x.getIndex();};
    	x.mObj.setSub();
    	var nItem = {}, mItem = {};
    	document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
    	for(var i in x.ss) {
    		nItem = new x.mObj.getItem();
    		nItem.id = 'Note';
    		nItem.label = x.ss[i].label;
    		nItem.value = String(i);
    		nItem.checked = false;
    		// nItem.oncommand = Cb.gMyPrn('erty'+x.id);
    		mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    		this.ss[i].sItemId = mItem.id;
    		mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
    		mItem.setAttribute( 'type','checkbox')
    		mItem.setAttribute( 'checked',false)
    		mItem.setAttribute( 'autocheck',false )
    	} // End for(var i in this.ss)
    	x.mObj.getItem();
    	nItem = x.mObj.getItem();
    	nItem.id = 'Note';
    	this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
    	this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*,  CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    **************************************************************
     L = IF text is highlighted:
       BBCode: [i]Highlighted[/i]
       HTML: <i>Highlighted</i>
       WIKI: *Highlighted*
       OR nothing highlighted
         First click = [i], <i>, or *
         Second click = [/i], </i>, or *
     M =
       BBCode: [i]Clipboard[/i]
       HTML: <i>Clipboard</i>
       WIKI: *Clipboard*
     R = Context Menu with tag options and submenu for CB Context
  270. JavaScript Panel

    Code Tab

    extOpenDialog('chrome://ctxextensions/content/JSPanel/JSPanel.xul', 'ctxextensions:JSPanel');

    Initialization Tab

    if(typeof ExtService == "object") return;
    var ext = "ContextMenu Extensions";
    var err = ext + " extension is not installed or is disabled.";
    this.setAttribute("oncommand",
      "alert('" + err + "'); " +
      "this.disabled = true; " +
      "this.style.opacity = '.25';"
    );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/javascript-panel-button.html');

    Help Tab

  271. Justify²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [jus'+'tify]Clipboard[/jus'+'tify]\n\nHTML: <p style="text-align:justify">Clipboard</p>';
    this.ss = [
      { label: 'BBCode', open: '[jus'+'tify]'                        , open1: '[jus'+'tify]%h'                        , close: '[/jus'+'tify]', sItemId: '' },
      { label: 'HTML'  , open: '<'+'p style="text-ali'+'gn:justify">', open1: '<'+'p style="text-ali'+'gn:justify">%h', close: '</'+'p>'      , sItemId: '' },
      { label: 'WIKI N/A', open: ''                                  , open1: ''                                      , close: ''             , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function(oBtn){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          x.text += x.listo;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked=true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.cBoard) {
        alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
        return;
      }
      x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
      var nLen = x.n.length;
      x.text += x.n;
      x.theBox.value = x.text + x.eBlock;
      x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-justify-group.html');
    this.setAttribute('dependency','FF 2.0.*,  CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [justify]Highlighted[/justify]
    	 HTML: <p style="text-align:justify">Highlighted</p>	
    	 WIKI N/A: 	
    	 OR nothing highlighted
    		 First click = [justify] or <p style="text-align:justify">	
    		 Second click = [/justify] or </p>
     M =  ( Highlighted text will be replaced )
    	 BBCode: [justify]Clipboard[/justify]
    	 HTML: <p style="text-align:justify">Clipboard</p>	
    		 Any Highlighted text will be REPLACED	
    	 WIKI N/A: 	
     R = Context Menu with tag options and submenu for CB Context
  272. Keyconfig

    Code Tab

    document.getElementById('keyconfig').click();

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080914.03');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/keyconfig-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  273. keywordManager

    Code Tab

    /*Code*/
    /* ***** BEGIN LICENSE BLOCK *****
     * Version: MPL 1.1/GPL 2.0/LGPL 2.1
     * 
     * The contents of this file are subject to the Mozilla Public License Version
     * 1.1 (the "License"); you may not use this file except in compliance with
     * the License. You may obtain a copy of the License at
     * http://www.mozilla.org/MPL/
     * 
     * Software distributed under the License is distributed on an "AS IS" basis,
     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     * for the specific language governing rights and limitations under the
     * License.
     * 
     * The Original Code is keywordManager
     * http://caspar.regis.free.fr/kwm/
     * 
     * The Initial Developer of the Original Code is 
     * Régis Caspar. 
     * Portions created by the Initial Developer are Copyright (C) 2005
     * the Initial Developer. All Rights Reserved.
     * 
     * Contributor(s):
     * LouCypher - Custom Buttons
     * 
     * Alternatively, the contents of this file may be used under the terms of
     * either the GNU General Public License Version 2 or later (the "GPL"), or
     * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     * in which case the provisions of the GPL or the LGPL are applicable instead
     * of those above. If you wish to allow use of your version of this file only
     * under the terms of either the GPL or the LGPL, and not to allow others to
     * use your version of this file under the terms of the MPL, indicate your
     * decision by deleting the provisions above and replace them with the notice
     * and other provisions required by the GPL or the LGPL. If you do not delete
     * the provisions above, a recipient may use your version of this file under
     * the terms of any one of the MPL, the GPL or the LGPL.
     * 
     * ***** END LICENSE BLOCK ***** */
    /*---------------------------------------------------*\
       Icon comes from the tango project
       http://tango.freedesktop.org/Tango_Desktop_Project
       and is released under CC/by-sa
       http://creativecommons.org/licenses/by-sa/2.5/
    \*---------------------------------------------------*/
    openDialog(this.xurl, "kwm", "chrome, dialog=no, centerscreen");
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.xurl = "data:application/vnd.mozilla.xul+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KCjwhLS0gKioqKiogQkVHSU4gTElDRU5TRSBCTE9DSyAqKioqKgogICAtIFZlcnNpb246IE1QTCAxLjEvR1BMIDIuMC9MR1BMIDIuMQogICAtCiAgIC0gVGhlIGNvbnRlbnRzIG9mIHRoaXMgZml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JGaWx0ZXIoKTsiIAogICAgICAgICAgICAgIGRpc2FibGVkPSJ0cnVlIiAvPgogICAgPC9oYm94PgoKICAgIDxzcGFjZXIgLz4KCiAgICA8dHJlZSBpZD0ia3dtLXRyZWUiIGZsZXg9IjEiIHJvd3M9IjEwIiBoaWRlY29sdW1ucGlja2VyPSJ0cnVlIgogICAgICAgICAgc2VsdHlwZT0ic2luZ2xlIiAKICAgICAgICAgIG9uZGJsY2xpY2s9IktXTS5kb3VibGVjbGljayhldmVudCk7IiA+CiAgICAgIDx0cmVlY29scz4KICAgICAgICA8dHJlZWNvbCBpZD0ia3dtLXRyZWVjb2wtbmFtZSIgbGFiZWw9Ik5hbWUiIGZsZXg9IjQiIC8+CiAgICAgICAgPHRyZWVjb2wgaWQ9Imt3bS10cmVlY29sLWtleXdvcmQiIGxhYmVsPSJLZXl3b3JkIiAKICAgICAgICAgICAgICAgICBmbGV4PSIyIiAvPgogICAgICAgIDx0cmVlY29sIGlkPSJrd20tdHJlZWNvbC1pZCIgbGFiZWw9IklkIiBmbGV4PSIyIiBoaWRkZW49InRydWUiIC8+CiAgICAgIDwvdHJlZWNvbHM+CiAgICAgIDx0cmVlY2hpbGRyZW4gLz4KICAgIDwvdHJlZT4KCiAgPC92Ym94PgoKPC9kaWFsb2c+Cg==";
    this.keywordManager = function() {
      var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;http://caspar.regis.free.fr/kwm/1"]
                         .getService(Components.interfaces.nsIWindowWatcher);
      var em = ww.getWindowEnumerator();
      var index = 1;
      while(em.hasMoreElements()) {
        var win = em.getNext();
        if(win.name == "kwm") {
          win.focus();
          return;
        }
        index++
      }
      openDialog(this.xurl, "kwm", "chrome, dialog=no, centerscreen");
    }
    // Bottom Panel integration, requires Bottom Panel custom button
    var thisButton = this;
    window.setTimeout(function() {
      var root = document.documentElement;
      var xp = "//*[starts-with(@id, 'custombuttons-')]";
      var cbs = document.evaluate(xp, root, null, 6, null);
      if (!cbs.snapshotLength) return;
      for (var i = 0; i < cbs.snapshotLength; i++) {
        var cb = cbs.snapshotItem(i);
        if (cb.label == "Bottom Panel") {
          thisButton.bottomPanel = cb.bottomPanel;
          thisButton.setAttribute("onclick",
                                  "if (event.button == 1) " +
                                  "this.bottomPanel(this.xurl);")
        }
      }
    })
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','2009.05.25');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/keyword-manager.html');
    this.setAttribute('dependency','CustomButtons2');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  274. Kill

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    this.leftclick   = function(evt){
    	this.parentNode.collapsed = true;
    }
    this.setAttribute("onclick","custombuttons.gQuot.mHandler( event, this )"); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20080124.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/kill-button.html');
    this.setAttribute('dependency','FF 2.0.0.*, cb2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    var tbId = this.parentNode.id.replace(/__customToolbar_/,"")
    this.tooltipText += ' '+tbId;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    Help%20not%20developed%20for%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.%0A
  275. Launch Avant Browser

    Code Tab

    var appName = "Avant Browser";
    var regRoot = Components.interfaces.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER;
    var regKey = "Software\\Avant Browser";
    var regValue = "InstallPath";
    var appExe = "\\avant.exe";
    var branch = "avantBrowser";
    var url = gBrowser.currentURI;
    this.LaunchApp(appName, regRoot, regKey, regValue, appExe, branch, url);
    

    Initialization Tab

    function isSupported(aURI) {
      var mSchemes = ["file", "ftp", "http", "https"];
      return mSchemes.indexOf(aURI.scheme) > -1;
    }
    this.LaunchApp = function(aName, aReg, aKey, aValue, aExe, aBranch, aURI) {
      if(!isSupported(aURI)) {
        alert("Unsupported URI scheme '" + aURI.scheme + "'!");
        return;
      }
      var prefString = "custombuttons.lauchApp." + aBranch;
      var path2exe;
      try {
        path2exe = gPrefService.getCharPref(prefString);
      } catch(ex) {
        try {
          var winReg = Components.classes["@mozilla.org/windows-registry-key;1"]
                        .createInstance(Components.interfaces.nsIWindowsRegKey);
          winReg.open(aReg, aKey, Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
          path2exe = winReg.readStringValue(aValue) + aExe;
          winReg.close();
        } catch(ex) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Set " + aName + "Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) path2exe = fp.file.path;
          else return;
        }
      }
      gPrefService.setCharPref(prefString, path2exe);
      var app = Components.classes["@mozilla.org/file/local;1"]
                    .createInstance(Components.interfaces.nsILocalFile);
      app.initWithPath(path2exe);
      var process = Components.classes["@mozilla.org/process/util;1"]
                      .createInstance(Components.interfaces.nsIProcess);
      process.init(app);
      process.run(false, [aURI.spec], 1);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'LouCypher');							// Stores Author.
    this.setAttribute("version",'20060814.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-button-group.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    /* -------------------------------------------------------------
         Launch Application
         by LouCypher (aka Zoolcar9)
         Open current page with other aplication/browser
       ------------------------------------------------------------- */
    
  276. Launch Clipboard

    Code Tab

    /* ***** BEGIN LICENSE BLOCK *****
    * Version: MPL 1.1
    *
    * The contents of this file are subject to the Mozilla Public License Version
    * 1.1 (the "License"); you may not use this file except in compliance with
    * the License. You may obtain a copy of the License at
    * http://www.mozilla.org/MPL/
    *
    * Software distributed under the License is distributed on an "AS IS" basis,
    * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
    * for the specific language governing rights and limitations under the
    * License.
    * 
    * Alternatively, the contents of this file may be used under the
    * terms of the GNU General Public License Version 2 or later (the
    * "GPL"), in which case the provisions of the GPL are applicable 
    * instead of those above.
    *
    * The Original Code.
    * Alice0775
    * http://space.geocities.jp/alice0775/index2.html
    * (2007/03/21)
    * 
    * ***** END LICENSE BLOCK ***** */

    Initialization Tab

    /*初期設定コード(スタートアップで実行)*/
    // ---------------   Event Detect   ------------------
    this.handle = function(evt) {
    	try {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
      	switch(evt.button) {
      	case 0:
      		// クリップボードにコピーされた複数のリンクを新規タブに開く
     		launchclipboard2();
        		break;
      	case 1:	// Middle Click
      		break;
      	case 2:	// Right Click
      		// クリップボードにコピーされた複数の文字列をリンクと見なし新規タブに開く
      		launchclipboard();
      		break;
      	}
    	}catch(e) {alert(e);}
    	evt.preventDefault();
        	evt.stopPropagation();
        	return false;
    }
    this.showPopup = function(node) {
    	var popup = document.getElementById("custombuttons-contextpopup");
    	var x = node.boxObject.x;
    	var y = node.boxObject.y + node.boxObject.height;
    	document.popupNode = node;
    	popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.handle(event);");
    this.tooltipText = "[L=Launch Clipboard <a>Tags | R=Launch Clipboard Text Links]";
    this.style.opacity = '.65';
    this.setAttribute('style','border-color: transparent;');
    this.setAttribute("onmouseover", "this.style.opacity = '1'; this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';this.setAttribute('style','border-color: transparent;');" );
    this.setAttribute("onmousedown", "this.setAttribute('style','border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;');");
    this.setAttribute("onmouseup", "this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');");
    function launchclipboard2(){
      function str2dom(str){
        var xsl = (new DOMParser()).parseFromString([
          '<?xml version="1.0"?>',
          '<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">',
          '<output method="html"/>',
          '</stylesheet>'
        ].join("\n"), "text/xml");
        var xsltp = new XSLTProcessor();
        xsltp.importStylesheet(xsl);
        var htmldoc = xsltp.transformToDocument(document.implementation.createDocument("", "", null));
        var range = htmldoc.createRange();
        htmldoc.appendChild(htmldoc.createElement("html"));
        range.selectNodeContents(htmldoc.documentElement);
        htmldoc.documentElement.appendChild(range.createContextualFragment(str));
      	return htmldoc;
      }
      // get clipboard text
      try {
          var clip  = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
          var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
          trans.addDataFlavor("text/html");
          clip.getData(trans, clip.kGlobalClipboard);
          var str = new Object();
          var len = new Object();
          trans.getTransferData("text/html", str, len);
          if( str ) str = str.value.QueryInterface(Components.interfaces.nsISupportsString).toString();
          else return;
      } catch(ex) {return;}
      var doc = str2dom(str);
      const urlRegex = /\b((http|https|ftp):\/\/[-_\.!~*'\(\)a-zA-Z0-9;\/\?:@&=+$,%#]+)/ig;
    	var xpath = "//a[contains(@href,'http')]|//a[contains(@href,'ftp')]";
    	var candidates = doc.evaluate(xpath, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
      // Firefox 2.0
      if (candidates.snapshotLength > 1 &&
    	  '_confirmOpenTabs' in BookmarksCommand &&
    	  !BookmarksCommand._confirmOpenTabs(candidates.snapshotLength))
    	return;
    	for (var cand = null, i = 0, len = candidates.snapshotLength; i < len; i++) {
    		cand = candidates.snapshotItem(i)
    		if (!cand.href) continue;
        var url = cand.href;
        try{
          gBrowser.selectedTab = gBrowser.addTab(url);
        }catch(e){}
      }
    }
    function launchclipboard(){
    	const urlRegex = /\b(((h?t)?tps?|h..ps?|ftp):\/\/[-_\.!~*'\(\)a-zA-Z0-9;\/\?:@&=+$,%#]+)/ig;
      const urlRx = /\b(ttp|tp|h..p)/i;
      // get clipboard text
      try {
          var clip  = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
          var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
          trans.addDataFlavor("text/unicode");
          clip.getData(trans, clip.kGlobalClipboard);
          var str = new Object();
          var len = new Object();
          trans.getTransferData("text/unicode", str, len);
          if ( str )
              str = str.value.QueryInterface(Components.interfaces.nsISupportsString).toString();
          else
              return;
      } catch(ex) {
          return;
      }
      var arrUrl =[];
      var arr = str.split(/\n|,| |"|'/);
      if(!arr)return;
      for(var i=0,len=arr.length;i<len;i++){
        if(!arr[i])continue;
        var url = arr[i].match(urlRegex);
        if(!url)continue;
        for(var j=0,lenj=url.length;j<lenj;j++){
          if(url[j]) arrUrl.push(convurl(url[j].replace(urlRx,'http')));
        }
      }
      // Firefox 2.0
      if (arrUrl.length > 1 &&
       '_confirmOpenTabs' in BookmarksCommand &&
       !BookmarksCommand._confirmOpenTabs(arrUrl.length))	return;
      for(var i=0,len=arrUrl.length;i<len;i++){
        try{
          gBrowser.selectedTab = gBrowser.addTab(arrUrl[i]);
        }catch(e){}
      }
      function convurl(url){
        var iQuery = url.toString().indexOf("?");
        if (iQuery > -1) {
          var pathNode = url.toString().substr(0,iQuery).replace(/&amp;/ig,'&');
          var queryNode = url.toString().substr(iQuery);
          return pathNode.concat(queryNode);
        }else{
          return url.toString().replace(/&amp;/ig,'&');
        }
      }
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/launch-clipboard-alice0775.html');

    Help Tab

  277. Launch Flock

    Code Tab

    var appName = "Flock";
    var regRoot = Components.interfaces.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE;
    var regKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\FLOCK.EXE";
    var regValue = "";
    var appExe = "";
    var branch = "flock";
    var url = gBrowser.currentURI;
    this.LaunchApp(appName, regRoot, regKey, regValue, appExe, branch, url);
    

    Initialization Tab

    function isSupported(aURI) {
      var mSchemes = ["file", "ftp", "http", "https"];
      return mSchemes.indexOf(aURI.scheme) > -1;
    }
    this.LaunchApp = function(aName, aReg, aKey, aValue, aExe, aBranch, aURI) {
      if(!isSupported(aURI)) {
        alert("Unsupported URI scheme '" + aURI.scheme + "'!");
        return;
      }
      var prefString = "custombuttons.lauchApp." + aBranch;
      var path2exe;
      try {
        path2exe = gPrefService.getCharPref(prefString);
      } catch(ex) {
        try {
          var winReg = Components.classes["@mozilla.org/windows-registry-key;1"]
                        .createInstance(Components.interfaces.nsIWindowsRegKey);
          winReg.open(aReg, aKey, Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
          path2exe = winReg.readStringValue(aValue) + aExe;
          winReg.close();
        } catch(ex) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Set " + aName + " Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) path2exe = fp.file.path;
          else return;
        }
      }
      gPrefService.setCharPref(prefString, path2exe);
      var app = Components.classes["@mozilla.org/file/local;1"]
                    .createInstance(Components.interfaces.nsILocalFile);
      app.initWithPath(path2exe);
      var process = Components.classes["@mozilla.org/process/util;1"]
                      .createInstance(Components.interfaces.nsIProcess);
      process.init(app);
      process.run(false, [aURI.spec], 1);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'LouCypher');							// Stores Author.
    this.setAttribute("version",'20060814.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-button-group.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    /* -------------------------------------------------------------
         Launch Application
         by LouCypher (aka Zoolcar9)
         Open current page with other aplication/browser
       ------------------------------------------------------------- */
  278. Launch IE

    Code Tab

    var appName = "Internet Explorer";
    var regRoot = Components.interfaces.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE;
    var regKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\IEXPLORE.EXE";
    var regValue = "";
    var appExe = "";
    var branch = "iexplore";
    var url = gBrowser.currentURI;
    this.LaunchApp(appName, regRoot, regKey, regValue, appExe, branch, url);
    

    Initialization Tab

    function isSupported(aURI) {
      var mSchemes = ["file", "ftp", "http", "https"];
      return mSchemes.indexOf(aURI.scheme) > -1;
    }
    this.LaunchApp = function(aName, aReg, aKey, aValue, aExe, aBranch, aURI) {
      if(!isSupported(aURI)) {
        alert("Unsupported URI scheme '" + aURI.scheme + "'!");
        return;
      }
      var prefString = "custombuttons.lauchApp." + aBranch;
      var path2exe;
      try {
        path2exe = gPrefService.getCharPref(prefString);
      } catch(ex) {
        try {
          var winReg = Components.classes["@mozilla.org/windows-registry-key;1"]
                        .createInstance(Components.interfaces.nsIWindowsRegKey);
          winReg.open(aReg, aKey, Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
          path2exe = winReg.readStringValue(aValue) + aExe;
          winReg.close();
        } catch(ex) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Set " + aName + "Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) path2exe = fp.file.path;
          else return;
        }
      }
      gPrefService.setCharPref(prefString, path2exe);
      var app = Components.classes["@mozilla.org/file/local;1"]
                    .createInstance(Components.interfaces.nsILocalFile);
      app.initWithPath(path2exe);
      var process = Components.classes["@mozilla.org/process/util;1"]
                      .createInstance(Components.interfaces.nsIProcess);
      process.init(app);
      process.run(false, [aURI.spec], 1);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'LouCypher');							// Stores Author.
    this.setAttribute("version",'20060814.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-button-group.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    

    Help Tab

    /* -------------------------------------------------------------
         Launch Application
         by LouCypher (aka Zoolcar9)
         Open current page with other aplication/browser
       ------------------------------------------------------------- */
    
  279. Launch Maxthon

    Code Tab

    var appName = "Maxthon";
    var regRoot = Components.interfaces.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER;
    var regKey = "Software\\Maxthon\\";
    var regValue = "Folder";
    var appExe = "\\Maxthon.exe";
    var branch = "maxthon";
    var url = gBrowser.currentURI;
    this.LaunchApp(appName, regRoot, regKey, regValue, appExe, branch, url);
    

    Initialization Tab

    function isSupported(aURI) {
      var mSchemes = ["file", "ftp", "http", "https"];
      return mSchemes.indexOf(aURI.scheme) > -1;
    }
    this.LaunchApp = function(aName, aReg, aKey, aValue, aExe, aBranch, aURI) {
      if(!isSupported(aURI)) {
        alert("Unsupported URI scheme '" + aURI.scheme + "'!");
        return;
      }
      var prefString = "custombuttons.lauchApp." + aBranch;
      var path2exe;
      try {
        path2exe = gPrefService.getCharPref(prefString);
      } catch(ex) {
        try {
          var winReg = Components.classes["@mozilla.org/windows-registry-key;1"]
                        .createInstance(Components.interfaces.nsIWindowsRegKey);
          winReg.open(aReg, aKey, Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
          path2exe = winReg.readStringValue(aValue) + aExe;
          winReg.close();
        } catch(ex) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Set " + aName + "Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) path2exe = fp.file.path;
          else return;
        }
      }
      gPrefService.setCharPref(prefString, path2exe);
      var app = Components.classes["@mozilla.org/file/local;1"]
                    .createInstance(Components.interfaces.nsILocalFile);
      app.initWithPath(path2exe);
      var process = Components.classes["@mozilla.org/process/util;1"]
                      .createInstance(Components.interfaces.nsIProcess);
      process.init(app);
      process.run(false, [aURI.spec], 1);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'LouCypher');							// Stores Author.
    this.setAttribute("version",'20060814.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-button-group.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    

    Help Tab

    /* -------------------------------------------------------------
         Launch Application
         by LouCypher (aka Zoolcar9)
         Open current page with other aplication/browser
       ------------------------------------------------------------- */
    
  280. Launch Mozilla

    Code Tab

    var appName = "Mozilla Suite";
    var regRoot = Components.interfaces.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE;
    var regKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Mozilla.exe";
    var regValue = "";
    var appExe = "";
    var branch = "mozilla";
    var url = gBrowser.currentURI;
    this.LaunchApp(appName, regRoot, regKey, regValue, appExe, branch, url);
    

    Initialization Tab

    function isSupported(aURI) {
      var mSchemes = ["file", "ftp", "http", "https"];
      return mSchemes.indexOf(aURI.scheme) > -1;
    }
    this.LaunchApp = function(aName, aReg, aKey, aValue, aExe, aBranch, aURI) {
      if(!isSupported(aURI)) {
        alert("Unsupported URI scheme '" + aURI.scheme + "'!");
        return;
      }
      var prefString = "custombuttons.lauchApp." + aBranch;
      var path2exe;
      try {
        path2exe = gPrefService.getCharPref(prefString);
      } catch(ex) {
        try {
          var winReg = Components.classes["@mozilla.org/windows-registry-key;1"]
                        .createInstance(Components.interfaces.nsIWindowsRegKey);
          winReg.open(aReg, aKey, Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
          path2exe = winReg.readStringValue(aValue) + aExe;
          winReg.close();
        } catch(ex) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Set " + aName + " Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) path2exe = fp.file.path;
          else return;
        }
      }
      gPrefService.setCharPref(prefString, path2exe);
      var app = Components.classes["@mozilla.org/file/local;1"]
                    .createInstance(Components.interfaces.nsILocalFile);
      app.initWithPath(path2exe);
      var process = Components.classes["@mozilla.org/process/util;1"]
                      .createInstance(Components.interfaces.nsIProcess);
      process.init(app);
      process.run(false, [aURI.spec], 1);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'LouCypher');							// Stores Author.
    this.setAttribute("version",'20060814.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-button-group.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    /* -------------------------------------------------------------
         Launch Application
         by LouCypher (aka Zoolcar9)
         Open current page with other aplication/browser
       ------------------------------------------------------------- */
    
  281. Launch Opera

    Code Tab

    var appName = "Opera";
    var regRoot = Components.interfaces.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER;
    var regKey = "Software\\Opera Software";
    var regValue = "Last Beta Directory3";
    var appExe = "\\opera.exe";
    var branch = "opera";
    var url = gBrowser.currentURI;
    this.LaunchApp(appName, regRoot, regKey, regValue, appExe, branch, url);
    

    Initialization Tab

    function isSupported(aURI) {
      var mSchemes = ["file", "ftp", "http", "https"];
      return mSchemes.indexOf(aURI.scheme) > -1;
    }
    this.LaunchApp = function(aName, aReg, aKey, aValue, aExe, aBranch, aURI) {
      if(!isSupported(aURI)) {
        alert("Unsupported URI scheme '" + aURI.scheme + "'!");
        return;
      }
      var prefString = "custombuttons.lauchApp." + aBranch;
      var path2exe;
      try {
        path2exe = gPrefService.getCharPref(prefString);
      } catch(ex) {
        try {
          var winReg = Components.classes["@mozilla.org/windows-registry-key;1"]
                        .createInstance(Components.interfaces.nsIWindowsRegKey);
          winReg.open(aReg, aKey, Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
          path2exe = winReg.readStringValue(aValue) + aExe;
          winReg.close();
        } catch(ex) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Set " + aName + "Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) path2exe = fp.file.path;
          else return;
        }
      }
      gPrefService.setCharPref(prefString, path2exe);
      var app = Components.classes["@mozilla.org/file/local;1"]
                    .createInstance(Components.interfaces.nsILocalFile);
      app.initWithPath(path2exe);
      var process = Components.classes["@mozilla.org/process/util;1"]
                      .createInstance(Components.interfaces.nsIProcess);
      process.init(app);
      process.run(false, [aURI.spec], 1);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'LouCypher');							// Stores Author.
    this.setAttribute("version",'20060814.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-button-group.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    /* -------------------------------------------------------------
         Launch Application
         by LouCypher (aka Zoolcar9)
         Open current page with other aplication/browser
       ------------------------------------------------------------- */
    
  282. Launch Opera

    Code Tab

    var appName = "Opera";
    var branch = "opera";
    var url = gBrowser.currentURI;
    var appExe = "\\opera.exe";
    this.LaunchApp(appName, appExe, branch, url);
    

    Initialization Tab

    /* -------------------------------------------------------------
         Launch Application
         by LouCypher (aka Zoolcar9)
         Open current page with other aplication/browser
       ------------------------------------------------------------- */
    function isSupported(aURI) {
      var mSchemes = ["file", "ftp", "http", "https"];
      return mSchemes.indexOf(aURI.scheme) > -1;
    }
    this.LaunchApp = function(aName, aExe, aBranch, aURI) {
      if(!isSupported(aURI)) {
        alert("Unsupported URI scheme '" + aURI.scheme + "'!");
        return;
      }
      var prefString = "custombuttons.lauchApp." + aBranch;
      var path2exe;
      try {
        path2exe = gPrefService.getCharPref(prefString);
      } catch(ex) {
        try {
    	var aRoot = Components.interfaces.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER;
    	var aKey = "Software\\Opera Software";
    	var aValue = "Last Beta Directory3";
          var winReg = Components.classes["@mozilla.org/windows-registry-key;1"]
                        .createInstance(Components.interfaces.nsIWindowsRegKey);
          winReg.open(aReg, aKey, Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
          path2exe = winReg.readStringValue(aValue) + aExe;
          winReg.close();
        } catch(ex) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Set " + aName + "Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) path2exe = fp.file.path;
          else return;
        }
      }
      gPrefService.setCharPref(prefString, path2exe);
      var app = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
      app.initWithPath( path2exe );
      var process = Components.classes["@mozilla.org/process/util;1"]
                      .createInstance(Components.interfaces.nsIProcess);
      process.init(app);
      process.run(false, [aURI.spec], 1);
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/lauch-opera-linux-jet-plane.html');

    Help Tab

  283. Launch Screensaver

    Code Tab

    /*Code*/
    var wrk = Components.classes["@mozilla.org/windows-registry-key;1"].
      createInstance(Components.interfaces.nsIWindowsRegKey);
    wrk.open(wrk.ROOT_KEY_CURRENT_USER, "Control Panel\\Desktop", wrk.ACCESS_READ);
    var data = wrk.readStringValue("SCRNSAVE.EXE");
    wrk.close();
    setTimeout(function() {
      var file = Components.classes["@mozilla.org/file/local;1"].
        createInstance(Components.interfaces.nsILocalFile);
      file.initWithPath(data);
      file.launch();
    }, 3000);

    Initialization Tab

    /*Initialization code*/
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/launch-screensaver.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.0.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  284. Launch SeaMonkey

    Code Tab

    var appName = "SeaMonkey";
    var regRoot = Components.interfaces.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE;
    var regKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\SeaMonkey.exe";
    var regValue = "";
    var appExe = "";
    var branch = "seamonkey";
    var url = gBrowser.currentURI;
    this.LaunchApp(appName, regRoot, regKey, regValue, appExe, branch, url);
    

    Initialization Tab

    function isSupported(aURI) {
      var mSchemes = ["file", "ftp", "http", "https"];
      return mSchemes.indexOf(aURI.scheme) > -1;
    }
    this.LaunchApp = function(aName, aReg, aKey, aValue, aExe, aBranch, aURI) {
      if(!isSupported(aURI)) {
        alert("Unsupported URI scheme '" + aURI.scheme + "'!");
        return;
      }
      var prefString = "custombuttons.lauchApp." + aBranch;
      var path2exe;
      try {
        path2exe = gPrefService.getCharPref(prefString);
      } catch(ex) {
        try {
          var winReg = Components.classes["@mozilla.org/windows-registry-key;1"]
                        .createInstance(Components.interfaces.nsIWindowsRegKey);
          winReg.open(aReg, aKey, Components.interfaces.nsIWindowsRegKey.ACCESS_READ);
          path2exe = winReg.readStringValue(aValue) + aExe;
          winReg.close();
        } catch(ex) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Set " + aName + " Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) path2exe = fp.file.path;
          else return;
        }
      }
      gPrefService.setCharPref(prefString, path2exe);
      var app = Components.classes["@mozilla.org/file/local;1"]
                    .createInstance(Components.interfaces.nsILocalFile);
      app.initWithPath(path2exe);
      var process = Components.classes["@mozilla.org/process/util;1"]
                      .createInstance(Components.interfaces.nsIProcess);
      process.init(app);
      process.run(false, [aURI.spec], 1);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'LouCypher');							// Stores Author.
    this.setAttribute("version",'20060814.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-button-group.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    

    Help Tab

    /* -------------------------------------------------------------
         Launch Application
         by LouCypher (aka Zoolcar9)
         Open current page with other aplication/browser
       ------------------------------------------------------------- */
    
  285. Left and Right All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
      if (content.scrollX > 0) {
        content.scrollTo(0, 0);
      } else {
        content.scrollTo((content.document.width+content.innerWidth)*2, 0);
      }
    }
    this.rightclick = function(e) {
      if (content.scrollX < 1) {
        content.scrollTo((content.document.width+content.innerWidth)*2, 0);
      } else {
        content.scrollTo(0, 0);
      }
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Go Left|R: Go Right|M: Go Menu";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080924.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/left-and-right-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    L%3A%20Go%20Left%0AR%3A%20Go%20Right%0AM%3A%20Go%20Middle
  286. Left²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [le'+'ft]Clipboard[/le'+'ft]\n\nHTML: <'+'p style="text-ali'+'gn:left">Clipboard</'+'p>';
    this.ss = [
      { label: 'BBCode'  , open: '[le'+'ft]'                        , open1: '[le'+'ft]%h'                        , close: '[/le'+'ft]' , sItemId: '' },
      { label: 'HTML'    , open: '<'+'p style="text-al'+'ign:left">', open1: '<'+'p style="text-al'+'ign:left">%h', close: '</'+'p>'    , sItemId: '' },
      { label: 'WIKI N/A', open: ''                                 , open1: ''                                   , close: ''           , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function(oBtn){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          x.text += x.listo;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked=true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.cBoard) {
        alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
        return;
      }
      x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
      var nLen = x.n.length;
      x.text += x.n;
      x.theBox.value = x.text + x.eBlock;
      x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-justify-group.html');
    this.setAttribute('dependency','FF 2.0.*,  CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [left]Highlighted[/left]
    	 HTML: <p style="text-align:left">Highlighted</p>	
    	 WIKI N/A: 	
    	 OR nothing highlighted
    		 First click = [left] or <p style="text-align:left">	
    		 Second click = [/left] or </p>
     M =  ( Highlighted text will be replaced )
    	 BBCode: [left]Clipboard[/left]
    	 HTML: <p style="text-align:left">Clipboard</p>	
    		 Any Highlighted text will be REPLACED	
    	 WIKI N/A: 	
     R = Context Menu with tag options and submenu for CB Context
  287. Link Button

    Code Tab

    /*Code*/

    Initialization Tab

    var link = "http://www.google.com"
    this.leftclick = function(evt){
    	openUILink(link);
    }
    this.midclick = function(evt){
    	gBrowser.selectedTab = gBrowser.addTab(link);
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.style.opacity = '1.0';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/link-button-just-link-using-url.html');

    Help Tab

  288. Link²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [li'+'st][*]Clipboard\n\nHTML: <l'+'i>Clipboard</l'+'i>';
    this.ss = [
      { label: 'BBCode'  , open: '[u'+'rl]'        , open1: '[u'+'rl=%c]%h'           , close: '[/u'+'rl]'   , sItemId: '' },
      { label: 'HTML'    , open: '<'+'a hr' + 'ef>', open1: '<'+'a href="' + '%c"> %h', close: '<'+'/' + 'a>', sItemId: '' },
      { label: 'WIKI N/A', open: ''                , open1: ''                        , close: ''            , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      initMeth  : function( oBtn ){
            this.index  = Number(Cb.getPref( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          if ( e.ctrlKey ) {
            var oValid = this.validUrl( x.cBoard )
            if ( !oValid.lRet ) return;
            x.cBoard = oValid.value;
            x.text += x.liste.replace(/%c/,x.cBoard).replace(/%h/,'');
          } else {
            x.text += x.listo;
          }
          var nLen = x.text.length;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked=true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        var oValid = this.validUrl( x.Highlight )
        if ( !oValid.lRet ) return;
        x.Highlight = oValid.value;
        x.n += x.liste.replace(/\=%c/,'').replace(/%h/g,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro
      var oValid = this.validUrl( x.cBoard )
      if ( !oValid.lRet ) return;
      x.cBoard = oValid.value;
      x.n = x.liste.replace( /%c/, x.cBoard ).replace( /%h/, ( x.Highlight )? x.Highlight : x.cBoard );
      x.n += x.listc
      x.text += x.n;
      var nLen = x.text.length;
      x.theBox.value = x.text + x.eBlock;
      x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPref( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPref(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    this.validUrl = function( sUrl ) {
      var sTitle = 'Retry URL', sMsg = 'Url:  %s\n\nwas invalid, click "Continue" to retry';
      if ( !sUrl | !isUrl(sUrl) ) {
        var lExit = lResult = false;
        while ( ! lExit ) {
          lResult = this.Select();
          lExit = (lResult)? isUrl(this.input.value) : true;
          if ( !lExit  && lResult ) { // wanted invalid url
            lResult = this.prompts.confirm(null, sTitle, sMsg.replace(/%s/,this.input.value) );
            lExit = ( lResult )?  false : true;
          }
        }
      } else {
        this.input.value = sUrl;
        lResult = true;
      }
      return {lRet:lResult,value:this.input.value}
    };
    this.Select = function (){
      this.input.value = 'http://';
      var result = this.prompts.prompt(null, this.sTitle, this.sMsg, this.input, null, this.check);
      var x = this.input.value
      this.input.value = x.replace(/[\\]/g,'/')
      return result;
    };
    this.prompts  = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
          .getService(Components.interfaces.nsIPromptService);
    this.input  = {value: 'http://'};
    this.check  = {value: false };
    this.sTitle  = 'Link Prompt';
    this.sMsg  = 'Enter the link URL';
    function isUrl(s) {
      var regexp = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
      return regexp.test(s);
    }
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPref("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-link-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    ******************************************************	
     L = IF text is highlighted:
    		 BBCode: [url]Highlighted|Prompt[/url]
    		 HTML: <a href>Highlighted|Prompt</a>	
    	 OR nothing highlighted
    		 First click = [url] or <a href>
    		 Second click = [/url] or </a>	
     M = 
    		 BBCode: [url=%c]Highlighted[/url]
    		 HTML: <a href=%c>Highlighted</a>
    	     Where %c = Clipboard Contents (Link)
    	 OR nothing highlighted
    		 BBCode: [url=%c][/url]
    		 HTML: <a href=%c></a>	
    	     Where %c = Clipboard Contents (Link)
     R = Context Menu with tag options and submenu for CB Context
  289. Linkification Image URLs

    Code Tab

    switch(this.PS.getBoolPref(this.pref)){
    	case true: this.PS.setBoolPref(this.pref,0); break;
    	case false: this.PS.setBoolPref(this.pref,1); break;
    }

    Initialization Tab

    this.pref = 'linkification.settings.Linkify_LinkifyImages';
    this.setState = function() {
      var state;
      try {
        state = this.PS.getBoolPref(this.pref);
        if(state == 1) {
          this.image = 'data:image/png;base64,' +
    		'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m' +
    		'dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIhSURBVDjLjZPfS1NxGMbPjX9Bl/0PXqQzIYIEWWIp' +
    		'RFFBQwyNQqhG4VY0dUK0gXQh+KMhu2nKIAkpAu0wkBA0f0QRtoLuFgSbOmSbZ+estsf3+e6ssE7hxXNz' +
    		'4PM+7/d9nqMB0A6jr3Var2hJlBFZorKochhwUpQmkO65iC3/DWwP3sJO0Av59l/QI0qlmuux5buO7EMv' +
    		'cuM+5AInsRdqxo/5ART92j/hqMhIX7uMbOgudu+7YYRdsMaPozRZ1c/EIKwHmiM8KyptD9xEbsyHQvAY' +
    		'SjZozZyC+boDxbeXYKUmkF9vcHQu7QzdRn7KD/OxqwrGW1B8cx7GZheML1eVrO8R5N+5/nqzQWfC1miT' +
    		'gs1X7TA+eBT0bdOD5yudCCRaMPF+CEej2oEBKb6Za9ecTb0TRrIbewLPLnegd/4E2l824vSLBoQ3Ajgy' +
    		'pR2IqpJ9dAeF4cbfzgJnPnVhZLEVZ23wSsyHvkgcMf0jzvTP/RqQZlSF6D11ML6Za9OZcJuA555dQN+T' +
    		'OKb1JGb0z3i6kKwOsBtWZs6Miu7qYPbadCYcjCUUGJ5eQ09IJ2yKVjlgiQ1jSZgzo+K1eTC+mWvTmbB3' +
    		'dLEGumu344AM68mGqbdLznTntXkwvplr05nwn73hAIvdZj3V+lISDmBUyj1SdbfXdjsNKPPHYLdVPaVh' +
    		'LAlzZlS8tn0w06n2HFDhX8Ufg91mPdkwloQ589K2Vp0G7AOR2a7+EgKeFAAAAABJRU5ErkJggg==';
        } else {
          this.image = 'data:image/png;base64,' +
    		'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMA' +
    		'AAsTAAALEwEAmpwYAAAAB3RJTUUH1gwfBDI1efPH1AAAAkxJREFUeNqNk8Fq4lAUhr/cm9Q0Jook0SQo' +
    		'FVxk1V1R36AbqdBdYaCbeZa+wqzmBZyN61m5rwhd6aoqpEgpYlxkIXJDN9qZdsrQsz7nP//h/46mlOIr' +
    		'5Xned+AWiIEyoAOa/oXBH8A14HU6HVGpVDg5OUEIwXA4RP/P4DfgLoqixvn5ObZtUyqVWK1WCCG4uLgg' +
    		'TdPPBTzP+wncdLvd00ajwXa7RSnFfr+nVqsBoOs6Qoh/BTzP+wX0e72e4fs+z8/PVKtVpJTYto3rujiO' +
    		'QxzHKKXeCxw29/v9vhGGIev1Gt/3cRyHMAxxXRcpJQBSyvcODjff9Ho9IwxD0jTFsiyiKCKKIkzTJMsy' +
    		'ZrMZSZLQbDYZDAbvHNx1u91T3/dZr9dYlsXZ2Rn1eh1N0xiPx0ynU7IsI89zgiD4c8Ihqnqj0eDl5QXX' +
    		'dYmiiHq9zm63YzQasVgsyPMcwzAoFApYlkWxWHxzcH15ealVq1W22y2O4xBFEZqmMRqNeHx8REqJaZq0' +
    		'220AjgDqB8I827Z5enqiXC4ThiGmaTIej1ksFkgpCYKAVqvFcrlkPp+z2Wx2wIMO3HY6HVEqldjv929R' +
    		'ZVnGdDolz3NM06TVanF/f0+SJDvgajKZ/ObAc1ypVFitVtRqtbeoZrMZWZZhGAbtdpvlckmSJLvJZGL+' +
    		'Hb0OlI9sAziOA0CSJOR5TqFQAGA+nwNcfQRPB/Qj27quE8cxUkqazSZBEGBZFkopNpvN7mj7o4A2HA5J' +
    		'0xQhBEophBAMBgOUUhSLxWPvw2d/8wqfxMwXqhxjvgAAAABJRU5ErkJggg==';
        }
      } catch(ex) {
        state = this.PS.setBoolPref(this.pref, true);
      }
    }
    this.PS = Components.classes['@mozilla.org/preferences-service;1']
                        .getService(Components.interfaces.nsIPrefBranch);
    this.ob = {};
    this.ob.observe = this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/linkification-urls-newb.html');

    Help Tab

  290. List (Alpha)²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [li'+'st=a|A][*'+']Clipboard\n\nHTML: <l'+'i>Clipboard</l'+'i>';
    this.ss = [
      { label: 'BBCode'  , open: '[li'+'st=%a]'                             , open1: '[*'+']%h'         , close: '[/li'+'st]', sItemId: '' },
      { label: 'HTML'    , open: '<o'+'l style="list-style-type: %a-alpha">', open1: '<l'+'i>%h</l'+'i>', close: '</o'+'l>'  , sItemId: '' },
      { label: 'WIKI N/A', open: ''                                         , open1: ''                 , close: ''          , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function( oBtn ){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if ( x.index == 0 ) {
        x.n = x.listo.replace(/%a/,( e.shiftKey )? 'A' : 'a' );
      } else {
        x.n = x.listo.replace(/%a/,( e.shiftKey )? 'upper' : 'lower') ;
      } // End if ( x.index == 0 )
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref = 0;
          this.checked = false;
          break;
        case 0:
          x.text += x.n;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.n.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked = true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.cBoard = x.Highlight;
        this.processLines( e, x )
      }
    }; // End this.doLeft*/
    /*----------------------------------------------------
      Function:  this.processLines( e, x )
      Args:  e, x
      Returns: sProcText
      Calls:
      Purpose: process all Highlighted/gClipboard lines and apply
         tags to non empty lines
    ----------------------------------------------------*/
    this.processLines = function( e, x )
    {
      x.arr = (e.ctrlKey)? x.cBoard.split('\n') : [x.cBoard];
      for (var i in x.arr) {
        if ( x.arr[i].length > 0 ) {
          x.n += x.liste.replace(/%h/,x.arr[i]);
          x.n += (i < x.arr.length-1 ) ? '\n' : "";
        } else {
          x.n += '\n';
        } // End if ( x.arr.length > 2 )
      } // End for
      x.n += ( x.cBoard.length > 0 ) ? x.listc : '';
      x.text += x.n;
      var nLen = x.text.length
      x.text += x.eBlock;
      x.theBox.value = x.text;
      x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
      x.arr =[];
    }; // End function this.processLines( e, x, sText )
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if ( e.ctrlKey ) {
        if ( x.index == 0 ) {
          x.n = x.listo.replace(/%a/,( e.shiftKey )? 'A' : 'a' );
        } else {
          x.n = x.listo.replace(/%a/,( e.shiftKey )? 'upper' : 'lower') ;
        } // End if ( x.index == 0 )
        x.str = gClipboard.read();
        this.processLines( e, x )
      } else {
        x.n = ( e.shiftKey )? '\n' : '' ;
        x.liste = x.n + x.liste
        x.n = x.liste.replace(/%h/,x.theBox.value.substring(x.startPos, x.endPos).replace(/\n/g, "\n"));
        var nLen = x.n.length;
        x.text += x.n;
        x.text +=x.theBox.value.substring(x.endPos, x.theBox.value.length);
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.startPos+nLen;
        x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      } // End if ( e.ctrlKey )
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-list-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    ***********************************************************************	
     L = IF text is highlighted:
    	 BBCode: [list=a]Highlighted[/list]
    	 HTML: <ol style="list-style-type: lower-alpha">Highlighted</ol>	
    	 WIKI N/A: 	
    	OR nothing highlighted
    	  First click = [list=a] or <ol style="list-style-type: lower-alpha">
    	  Second click = [/list] or </ol>	
     M =  ( Highlighted text will be replaced )
    	 BBCode: [*]Clipboard
    	 HTML: <li>Clipboard</li>	
    	 WIKI N/A: 	
     M+Shift =  ( Highlighted text will be replaced )
    	 BBCode: \n[*]Clipboard
    	 HTML: \n<li>Clipboard</li>	
    	 WIKI N/A: 	
     M+Ctrl =   ( Highlighted text will be replaced )
    	 BBCode: [list=a][*]Clipboard
    		 [*]contents[/list]
    	 HTML: <ol style="list-style-type: upper-alpha"><li>Clipboard</li>
    		 <li>contents</li></ol>	
    	 WIKI N/A: 	
     R = Context Menu with tag options and submenu for CB Context
  291. List (Numeric)²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    this.counter = new Cb.gCounter();
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [li'+'st=1][*]Clipboard\n\nHTML: <l'+'i>Clipboard</l'+'i>';
    this.ss = [
      { label: 'BBCode', open: '[li'+'st=1]'                                    , open1: '[*]%h'            , close: '[/li'+'st]', sItemId: '' },
      { label: 'HTML'  , open: '<o'+'l style="list-style-type: arabic-numbers">', open1: '<l'+'i>%h</l'+'i>', close: '</o'+'l>'  , sItemId: '' },
      { label: 'WIKI'  , open: '%n. '                                           , open1: '%n %h'            , close: ''          , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function(oBtn){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      let y = "";
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          y = x.listo.replace( /%n/, String( this.counter.inc()[1] ) )
          x.text += y;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + y.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          if ( x.listc ) { // In Wiki there is no closing tag
            this.pref=1;
            this.checked = true;
          }
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.cBoard = x.Highlight;
        this.processLines( e, x )
      }
    }; // End this.doLeft*/
    /*----------------------------------------------------
      Function:  this.processLines( e, x )
      Args:  e, x
      Returns: sProcText
      Calls:
      Purpose: process all Highlighted/gClipboard lines and apply
         tags to non empty lines
    ----------------------------------------------------*/
    this.processLines = function( e, x )
    {
      x.arr = (e.ctrlKey)? x.cBoard.split('\n') : [x.cBoard];
      x.n = ( x.index === 2 )? "" : x.listo;
      for (var i in x.arr) {
        if ( x.arr[i].length > 0 ) {
          x.n += x.liste.replace(/%h/, x.arr[i] ).replace( /%n/, ( x.index === 2 )? String( ++i ) + "." : "");
          --i;
          x.n += (i < x.arr.length-1 ) ? '\n' : "";
        } else {
          x.n += '\n';
        } // End if ( x.arr.length > 2 )
      } // End for
      x.n += ( x.cBoard.length > 0 ) ? x.listc : '';
      x.text += x.n;
      var nLen = x.text.length
      x.text += x.eBlock;
      x.theBox.value = x.text;
      x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
      x.arr =[];
    }; // End function this.processLines( e, x, sText )
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if ( e.ctrlKey ) {
        this.processLines( e, x )
      } else {
        x.n = ( e.shiftKey )? '\n' : '' ;
        x.liste = x.n + x.liste
        x.n = x.liste.replace(/%h/,x.theBox.value.substring(x.startPos, x.endPos).replace(/\n/g, "\n"));
        var nLen = x.n.length;
        x.text += x.n;
        x.text +=x.theBox.value.substring(x.endPos, x.theBox.value.length);
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.startPos+nLen;
        x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      } // End if ( e.ctrlKey )
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
      this.getIndex(this);
      if ( aIndex !== 2 ) this.counter.init();
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-list-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [list]Highlighted[/list]
    	 HTML:   <ul>Highlighted</ul>	
     	 WIKI:   *  Highlighted
    	 OR nothing highlighted
    		 First click = [list], <ul>, *
    		 Second click = [/list], </ul>, *	
     M =  ( Highlighted text will be replaced )
    	 BBCode: [*]Clipboard
    	 HTML: <li>Clipboard</li>	
    	 WIKI: *  Clipboard
     M+Shift =  ( Highlighted text will be replaced )
    	 BBCode: \n[*]Clipboard
    	 HTML: \n<li>Clipboard</li>	
    	 WIKI: \n*  Clipboard
     M+Ctrl =   ( Highlighted text will be replaced )
    	 BBCode: [list][*]Clipboard
    			[*]contents[/list]
    	 HTML:	<ul><li>Clipboard</li>
    		     <li>contents</li></ul>	
    	 WIKI:	*  Clipboard
    		     *  contents
     R = Context Menu with tag options and submenu for CB Context
  292. List (Roman)²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [li'+'st=i|I][*'+']Clipboard\n\nHTML: <l'+'i>Clipboard</l'+'i>';
    this.ss = [
      { label: 'BBCode'  , open: '[li'+'st=%a]'                             , open1: '[*'+']%h'         , close: '[/li'+'st]', sItemId: '' },
      { label: 'HTML'    , open: '<o'+'l style="list-style-type: %a-roman">', open1: '<l'+'i>%h</l'+'i>', close: '</o'+'l>'  , sItemId: '' },
      { label: 'WIKI N/A', open: ''                                         , open1: ''                 , close: ''          , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function( oBtn ){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if ( x.index == 0 ) {
        x.n = x.listo.replace(/%a/,( e.shiftKey )? 'I' : 'i' );
      } else {
        x.n = x.listo.replace(/%a/,( e.shiftKey )? 'upper' : 'lower') ;
      } // End if ( x.index == 0 )
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref = 0;
          this.checked = false;
          break;
        case 0:
          x.text += x.n;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.n.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked = true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.cBoard = x.Highlight;
        this.processLines( e, x )
      }
    }; // End this.doLeft*/
    /*----------------------------------------------------
      Function:  this.processLines( e, x )
      Args:  e, x
      Returns: sProcText
      Calls:
      Purpose: process all Highlighted/gClipboard lines and apply
         tags to non empty lines
    ----------------------------------------------------*/
    this.processLines = function( e, x )
    {
      x.arr = (e.ctrlKey)? x.cBoard.split('\n') : [x.cBoard];
      for (var i in x.arr) {
        if ( x.arr[i].length > 0 ) {
          x.n += x.liste.replace(/%h/,x.arr[i]);
          x.n += (i < x.arr.length-1 ) ? '\n' : "";
        } else {
          x.n += '\n';
        } // End if ( x.arr.length > 2 )
      } // End for
      x.n += ( x.cBoard.length > 0 ) ? x.listc : '';
      x.text += x.n;
      var nLen = x.text.length
      x.text += x.eBlock;
      x.theBox.value = x.text;
      x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
      x.arr =[];
    }; // End function this.processLines( e, x, sText )
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if ( e.ctrlKey ) {
        if ( x.index == 0 ) {
          x.n = x.listo.replace(/%a/,( e.shiftKey )? 'I' : 'i' );
        } else {
          x.n = x.listo.replace(/%a/,( e.shiftKey )? 'upper' : 'lower') ;
        } // End if ( x.index == 0 )
        x.str = gClipboard.read();
        this.processLines( e, x )
      } else {
        x.n = ( e.shiftKey )? '\n' : '' ;
        x.liste = x.n + x.liste
        x.n = x.liste.replace(/%h/,x.theBox.value.substring(x.startPos, x.endPos).replace(/\n/g, "\n"));
        var nLen = x.n.length;
        x.text += x.n;
        x.text +=x.theBox.value.substring(x.endPos, x.theBox.value.length);
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.startPos+nLen;
        x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      } // End if ( e.ctrlKey )
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-list-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    ***********************************************************************	
     L = IF text is highlighted:
    	 BBCode: [list=i]Highlighted[/list]
    	 HTML: <ol style="list-style-type: lower-roman">Highlighted</ol>	
    	 WIKI N/A: 	
    	OR nothing highlighted
    	   First click = [list=i] or <ol style="list-style-type: lower-roman">
    	   Second click = [/list] or </ol>	
     M =  ( Highlighted text will be replaced )
    	 BBCode: [*]Clipboard
    	 HTML: <li>Clipboard</li>
    	 WIKI N/A: 	
     M+Shift =  ( Highlighted text will be replaced )
    	 BBCode: \n[*]Clipboard
    	 HTML: \n<li>Clipboard</li>
    	 WIKI N/A: 	
     M+Ctrl =   ( Highlighted text will be replaced )
    	 BBCode: [list=i][*]Clipboard
    		 [*]contents[/list]
    	 HTML: <ol style="list-style-type: upper-roman"><li>Clipboard</li>
    		 <li>contents</li></ol>
    	 WIKI N/A: 	
     R = Context Menu with tag options and submenu for CB Context
  293. List²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\n [li'+'st]Highlighted[/li'+'st]';
    this.ss = [
      { label: 'BBCode', open: '[li'+'st]', open1: '[*]%h', close: '[/li'+'st]', sItemId: '' },
      { label: 'HTML'  , open: '<u'+'l>', open1: '<l'+'i>%h</l'+'i>', close: '</u'+'l>', sItemId: '' },
      { label: 'WIKI'  , open: '*  ', open1: '*  %h', close: '', sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function(oBtn){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          x.text += x.listo;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          if ( x.listc ) { // In Wiki there is no closing tag
            this.pref=1;
            this.checked = true;
          }
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.cBoard = x.Highlight;
        this.processLines( e, x )
      }
    }; // End this.doLeft*/
    /*----------------------------------------------------
      Function:  this.processLines( e, x )
      Args:  e, x
      Returns: sProcText
      Calls:
      Purpose: process all Highlighted/gClipboard lines and apply
         tags to non empty lines
    ----------------------------------------------------*/
    this.processLines = function( e, x )
    {
      x.arr = (e.ctrlKey)? x.cBoard.split('\n') : [x.cBoard];
      x.n = ( x.index === 2 )? "" : x.listo;
      for (var i in x.arr) {
        if ( x.arr[i].length > 0 ) {
          x.n += x.liste.replace(/%h/,x.arr[i]);
          x.n += (i < x.arr.length-1 ) ? '\n' : "";
        } else {
          x.n += '\n';
        } // End if ( x.arr.length > 2 )
      } // End for
      x.n += ( x.cBoard.length > 0 ) ? x.listc : '';
      x.text += x.n;
      var nLen = x.text.length
      x.text += x.eBlock;
      x.theBox.value = x.text;
      x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
      x.arr =[];
    }; // End function this.processLines( e, x, sText )
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if ( e.ctrlKey ) {
        this.processLines( e, x )
      } else {
        x.n = ( e.shiftKey )? '\n' : '' ;
        x.liste = x.n + x.liste
        x.n = x.liste.replace(/%h/,x.theBox.value.substring(x.startPos, x.endPos).replace(/\n/g, "\n"));
        var nLen = x.n.length;
        x.text += x.n;
        x.text +=x.theBox.value.substring(x.endPos, x.theBox.value.length);
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.startPos+nLen;
        x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      } // End if ( e.ctrlKey )
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-list-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [list]Highlighted[/list]
    	 HTML:   <ul>Highlighted</ul>	
     	 WIKI:   *  Highlighted
    	 OR nothing highlighted
    		 First click = [list], <ul>, *
    		 Second click = [/list], </ul>, *	
     M =  ( Highlighted text will be replaced )
    	 BBCode: [*]Clipboard
    	 HTML: <li>Clipboard</li>	
    	 WIKI: *  Clipboard
     M+Shift =  ( Highlighted text will be replaced )
    	 BBCode: \n[*]Clipboard
    	 HTML: \n<li>Clipboard</li>	
    	 WIKI: \n*  Clipboard
     M+Ctrl =   ( Highlighted text will be replaced )
    	 BBCode: [list][*]Clipboard
    			[*]contents[/list]
    	 HTML:	<ul><li>Clipboard</li>
    		     <li>contents</li></ul>	
    	 WIKI:	*  Clipboard
    		     *  contents
     R = Context Menu with tag options and submenu for CB Context
  294. Live HTTP Header

    Code Tab

    openLiveHTTPHeaders();

    Initialization Tab

    if(typeof openLiveHTTPHeaders != "function") {
      var ext = "Live HTTP Header";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/live-http-header-button.html');

    Help Tab

  295. Load in IE tab

    Code Tab

    /*
          Set the variable "url" in the initialization code tab to the URL you would like the button to open in an IE Tab, e.g. "http://google.co.uk".
          If you set URL to an empty string, thus "", the button will take the URL from the current tab.
          Left clicking will replace the current tab, middle clicking or ctrl+left clicking will open a new tab.
          This is a re-write of the original button of which the author is unknown, therefore I have credited "Others" in the authors attribute.
          Rawny ^^
    */
    

    Initialization Tab

    // ***** USER PREFS ***** //
    /*
       Please replace "URL goes here" with the URL you would like the button to open in an IE Tab, e.g. "http://google.co.uk".
       If you set URL to an empty string, thus "", the button will take the URL from the current tab.
    */
    var url = "URL goes here";
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt)
    {
          if (url == "")
                gBrowser.loadURI(gIeTab.getIeTabURL(gBrowser.selectedBrowser.webNavigation.currentURI.spec));
          else
                gBrowser.loadURI(gIeTab.getIeTabURL(url));
    }
    this.cleftclick = function(evt)
    {
          if (url == "")
                gBrowser.selectedTab = gBrowser.addTab(gIeTab.getIeTabURL(gBrowser.selectedBrowser.webNavigation.currentURI.spec));
          else
                gBrowser.selectedTab = gBrowser.addTab(gIeTab.getIeTabURL(url));   
    }
    this.midclick = function(evt)
    {
          if (url == "")
                gBrowser.selectedTab = gBrowser.addTab(gIeTab.getIeTabURL(gBrowser.selectedBrowser.webNavigation.currentURI.spec));
          else
                gBrowser.selectedTab = gBrowser.addTab(gIeTab.getIeTabURL(url));
    }
    // ***** INITIALISATION ***** // 
    if (url == "")
          this.tooltipText = "L: Change current tab to an IE Tab"+"\n"+"M: Open current URL in new IE Tab";
    else
          this.tooltipText = 'L: Open "'+url+'" as an IE Tab'+"\n"+'M: Open "'+url+'" in new IE Tab';
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, Others');
    this.setAttribute('version','2 (2009-03-24)');
    this.setAttribute('dependency','FF3.0*, FF2.0*, CB2 2.0.9*');
    this.setAttribute('status','Public');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/load-ie-tab.html');

    Help Tab

    Set the variable "url" in the initialization code tab to the URL you would like the button to open in an IE Tab, e.g. "http://google.co.uk".
    If you set URL to an empty string, thus "", the button will take the URL from the current tab.
    Left clicking will replace the current tab, middle clicking or ctrl+left clicking will open a new tab.
  296. Load Print Link

    Code Tab

    (function() {
    function linkIsSafe(h) {
      return(!/^mailto:/.exec(h)&&!/^javascript:/.exec(h));
    }
    var i, x, h;
    for(i = 0; x = content.document.getElementsByTagName('a')[i]; i++) {
      h = x.innerHTML.toLowerCase();
      if(h.indexOf('print') > -1 &&
         h.indexOf('edition') == -1 &&
         h.indexOf('subscri') == -1 &&
         h.indexOf('reprint') == -1 &&
         h.indexOf('slogan') == -1 &&
         linkIsSafe(x.href))
      {
        x.focus();
        content.location = x.href;
        return;
      }
    }
    alert("Can't find link to printer friendly version.");
    })();
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/load-print-link.html');

    Help Tab

  297. Load Printer Friendly Version

    Code Tab

    (function() {
    function linkIsSafe(h) {
      return(!/^mailto:/.exec(h)&&!/^javascript:/.exec(h));
    }
    var i, x, h;
    for(i = 0; x = content.document.getElementsByTagName('a')[i]; i++) {
      h = x.innerHTML.toLowerCase();
      if(h.indexOf('print') > -1 &&
         h.indexOf('edition') == -1 &&
         h.indexOf('subscri') == -1 &&
         h.indexOf('reprint') == -1 &&
         h.indexOf('slogan') == -1 &&
         linkIsSafe(x.href))
      {
        x.focus();
        content.location = x.href;
        return;
      }
    }
    alert("Can't find link to printer friendly version.");
    })();
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/load-printer-friendly-version.html');

    Help Tab

  298. Login filler

    Code Tab

    /*Code*/

    Initialization Tab

    function submit_form()
    {
    	submit_it(gBrowser.contentDocument.getElementsByTagName("BUTTON"));
    	submit_it(gBrowser.contentDocument.getElementsByTagName("INPUT"));	
    }
    function submit_it(obj)
    {
    for(var i=0;i<obj.length;i++)
    	{
    		if(obj[i].type=="submit")
    		{
    			obj[i].click();
    			break;
    		}
    		if(obj[i].type!="hidden" && (obj[i].type=="button"))
    			{
    				var n=obj[i].name.toLowerCase();
    				var v=obj[i].value.toLowerCase();
    		if(n.match("submit") || n.match("login") ||v.match("submit") ||v.match("login")||n.match("sign") ||v.match("sign"))
    			{
    				obj[i].click();
    				break;
    			}	
    			}
    	}
    }
    function form_fill(username,passwd)
    {
    	var obj= gBrowser.contentDocument.getElementsByTagName("INPUT");
    	for(var i=0;i<obj.length;i++)
    	{
    		if(obj[i].type!="hidden")
    		{
    			if(obj[i].type=="text")
    			{
    				var n=obj[i].name.toLowerCase();
    				if(n.match("name") || n.match("login")||n.match("mail"))
    				obj[i].value=username;
    			}
    			if(obj[i].type=="password")
    			obj[i].value=passwd;
    		}
    	}
    submit_form();
    }
    this.onLeftClick=function()
    {
    form_fill("username1","passwd1");
    }
    this.onMiddleClick=function()
    {
    form_fill("username2","passwd2");
    }
    this.onRightClick=function()
    {
    form_fill("username3","passwd3");
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	switch(evt.button) 
    	{
    		case 0:
    			this.onLeftClick();
    			break;
    		case 1:
    			this.onMiddleClick();
    			break;
    		case 2:
    			this.onRightClick();
    			break;
    	}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = this.label;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/login-filler.html');

    Help Tab

  299. Lottery

    Code Tab

    _content.top.location.href = 'http://www.national-lottery.co.uk/player/p/results/results.do' ;

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/lottery-results.html');

    Help Tab

  300. Magic Link - Old Style

    Code Tab

    // Change the forum number and the follow on hyperlink text in the two lines
    // below (See - "help" tab) to suit your own forum:-
    //
    	var forumnumber=33
    	var followtxt="threads here on Old Style"
    // Change the button Name and choose an Image (32x32 max) in the boxes above
    // here. (google images for YOURWORD.ico and/or .icon)
    //  
    // That's it - you're DONE :-)
    //
    custombuttons.gClipboard.write(""); //clear the clipboard
    // many thanks for the help from SCClockDr with this.
    // First look for a text box and get the selected text
    var theBox  = document.commandDispatcher.focusedElement;
    if ( theBox ) { // ensures no error if element NOT focused.
      var startPos = theBox.selectionStart;
      var endPos = theBox.selectionEnd;
      var oPosition = theBox.scrollTop;
      var oHeight = theBox.scrollHeight;
      var text = theBox.value.substring(0,startPos);  // Pre selection
      var nHeight = theBox.scrollHeight - oHeight;
      var Highlight = theBox.value.substring(startPos, endPos);  // Selected text
      var eBlock = theBox.value.substring(endPos, theBox.value.length);  // Post selection
    } // End if ( this.theBox )
    // If that didn't work try grabbing direct from the page
    if (!Highlight){
    //MANY thanks to Zoolcar9 for this bit ;-)
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
    var Highlight = winWrapper.getSelection().toString();
    }
    // warn if no text selected
    if (Highlight == ""){
    alert ("You have not selected any text");
    return;
    }
    // Now manipulate the selection to build the magic link
      var tmp = "[url=\"http://forums.moneysavingexpert.com/search.html?do=process&query=";
      tmp += escape(Highlight);  // "chicken soup" >> "chicken%20soup"
      tmp += "&forumchoice[]=";
      tmp += forumnumber;
      tmp += "&titleonly=1\"][b]";
      tmp += Highlight + " ";  // ==  "chicken soup "
      tmp += followtxt;
      tmp += "[/b][/url]";
      text = tmp;// Adds the manipulated text to the text prior to the selection.
    // Now put the selection back.
      custombuttons.gClipboard.write(text);  // inserts text into the clipboard
      goDoCommand('cmd_paste');  // paste
    

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute("author","squeaky, SCClockDr, Zoolcar9");
    this.setAttribute("version","3.14");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/replace-text-non-standard-text-box-demo.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.style.opacity = "0.75";
    this.onmouseover = function(evt)
    {
      this.style.opacity = "1";
    };
    this.onmouseout = function(evt)
    {
      this.style.opacity = "0.75";
    };
    

    Help Tab

    HOW%20TO%20EDIT%20THE%20BUTTON%20FOR%20YOUR%20FORUM%3A-%0A%0A1.%20Change%20the%20%22Name%22%20to%20suit%20you%20and%20your%20board.%0A%0A2.%20You%20can%20change%20the%20image%20with%20one%20off%20your%20computer%20by%20clicking%20on%20%22Browse%22%20or...%20use%20google%20image%20search%20using%20a%20suitable%20word.%20Image%20max%20size%20is%2032x32%20so%20choose%20the%20option%20for%20%22small%20images%22%20%28which%20Only%20shows%20on%20the%20results%20page%29.%20Step%20through%20until%20you%20have%20the%20image%20on%20its%20own%20on%20an%20empty%20page.%20Paste%20the%20URL%20into%20the%20%22Image%22%20box.%20To%20KEEP%20the%20images%20even%20if%20the%20website%20disappears%20-%20click%20on%20the%20%22-%3EBase64%22%20button.%0A%0A3.%20Change%20number%20in%20the%20line%3A-%20var%20forumnumber%3D33%20to%20your%20own%20forum%20number.%0A%28You%27ll%20see%20yours%20in%20the%20URL%20on%20the%20address%20bar%20when%20viewing%20your%20forum%27s%20Index%20page%3A-%20http%3A//forums.moneysavingexpert.com/...isplay.html%3Ff%3D22%20%29%0A%0A4.%20Change%20the%20quoted%20bit%20in%20the%20line%3A-%20var%20followtxt%3D%22threads%20here%20on%20Old%20Style%22%20to%20read%20whatever%20you%27d%20like%20to%20follow%20your%20search%20word%28s%29.%20I.e.%20if%20you%20just%20used%20the%20word%20%22compost%22%20the%20text%20here%20will%20be%20added%20on%20after%20the%20search%20word%28s%29.%20Then%20click%20on%20%22OK%22%20%27cos%20you%27re%20done%0A%0AUSING%20THE%20MAGIC%20LINK%20BUTTON%3A-%0A%0AFirst%20you%20need%20to%20find%20the%20sort%20of%20links%20that%20will%20help%20your%20member.%20For%20the%20magic%20links%20-%20do%20an%20%22Advanced%20search%22%20on%20%22Titles%20Only%22.%20Once%20you%20have%20the%20right%20seach%20word%28s%29%20LEAVE%20the%20search%20page%20and%20nip%20back%20to%20the%20post.%0A%20_______________________________________________________%20%0A%7C%20Hi%20Mr%20Nosearch%2C%0A%7C%20We%20have%20a%20few%20earlier%20threads%20on%20this%20subject%2C%20see%3A-%0A%7C%20%5Bmagic%20linky%5D%20%3A-%29%0A%0ANow%20type%20your%20search%20word%28s%29%20-%20something%20like%3A-%20chicken%20soup%0A%0A1.%20Select%20the%20text%20you%20are%20using%20for%20the%20link%0A2.%20click%20on%20the%20magic%20button%0A3.%20click%20on%20%22Post%22%20%27cos%20you%27re%20done%0A%0AIt%20changes%20this%3A-%20chicken%20soup%0A%0AInto%20this%3A-%5BURL%3D%20search%20etc%5D%5Bbold%5Dchicken%20soup%20threads%20here%20on%20Old%20Style%5B/bold%5D%5B/URL%5D%0A%0A%0A%0A
  301. Make a Bookmark Button

    Code Tab

    /*Code*/

    Initialization Tab

    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    var cb=custombuttons,self=this,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    function l(str) {
      self.properties = {
        en_US:{      // English US translation by nicholas
          Label_1:     'Make a Bookmark Button',
          Left:        'L',
          Middle:      'M',
          Right:       'R',
          Double:      'D',
          SClickCat:   '%s: %c', // converts to "Shift-click: Custom Buttons² Context Menu"
          NewTab_n:    'New Tab',
          ForeG_F:     'Foreground',
          BackG_B:     'Background',
          AbbrForeG_f: 'F', // Foreground Abbreviated
          AbbrBackG_b: 'B', // Background Abbreviated
          NewTabFore:  '%n (%F)', // converts to "New Tab (Foreground)"
          NewTabBack:  '%n (%B)', // converts to "New Tab (Background)"
          NewTabF:     '%n (%f)', // converts to "New Tab (F)"
          NewTabB:     '%n (%b)', // converts to "New Tab (B)"
          CurrTab:     'Current Tab',
          NewWin:      'New Window',
          Sidebar:     'Sidebar',
          BottomP:     'Bottom Panel',
          Prefs_2:     'Preferences',
          MabbPrefs:   '%1 %2', // Converts to "Make a Bookmark Button Preferences"
          Whatis_3:    'What is your preference for',
          WhatisL:     '%3 %4?', // Converts to "What is your preference for ...?"
          WhatisM:     '%3 %5?', // Converts to "What is your preference for ...?"
          WhatisR:     '%3 %6?', // Converts to "What is your preference for ...?"
          WhatisD:     '%3 %7?', // Converts to "What is your preference for ...?"
          LClick_4:    'Left-click',
          MClick_5:    'Middle-click',
          RClick_6:    'Right-click',
          DClick_7:    'Double-click',
          ShiftC_s:    'Shift-click',
          PrefSet:     'Your Preferences Have Been Set',
          PrefSetN:    'Your Preferences Have NOT Been Set',
          Docu:        'This button was auto-created with the %1', // %1 converts to "Make a Bookmark Button"
          Create:      'Create a New Bookmark Button',
          SetPrefs:    'Set Preferences for Created Buttons',
          CBContext_c: 'Custom Buttons² Context Menu',
          Help:        '',
          Help1:       "Creates a button from the current page, using the url and favicon from the page.  This gets rid of the need for creating a button manually that simply opens a url.",
          Help2:       "If the page does not have a favicon you will be prompted to insert one.  If you don't insert one, then it will use the custom button's default icon.",
          Help3:       "Options:",
        },
        ja:{         // 
          Left:        '左',
          Middle:      '中',
          Right:       '右',
        },
        fr_FR:{      // Traduction française fr par 
          Left:        'G',
          Middle:      'M',
          Right:       'D',
        },
        nl_NL:{      // Nederlandse vertaling door 
          Left:        'L',
          Middle:      'M',
          Right:       'R',
        },
        sv_SE:{      // 
          Left:        'V',
          Right:       'L',
        },
        es_ES:{      // 
          Left:        'I',
          Middle:      'M',
          Right:       'D',
        },
        es_AR:{      // 
          Left:        'I',
          Middle:      'M',
          Right:       'D',
        },
      };
      var tstr = cb.getLocalString(self, str);
      // Operations to handle replacements
      if (tstr.match(/[%]\w{1}/g)) {
        lang = (typeof self.properties[lang] != "undefined") ? lang : "en_US";
        for(prop in self.properties[lang]) {
          if ((prop.match(/[_]\w{1}$/)) && ((prop.substr(prop.lastIndexOf("_")+1)) == (tstr.substring(tstr.indexOf("%")+1, tstr.indexOf("%")+2)))) {
            var tok = tstr.substring(tstr.indexOf("%"), tstr.indexOf("%")+2);
            tstr = tstr.replace(tok, l(prop));
          }
        }
      }
      if (str == "Help") tstr = l("Help1")+"\n\n"+l("Help2")+"\n\n"+l("Help3")+"\n\n# "+l("NewTabFore")+"\n# "+l("NewTabBack")+"\n# "+l("CurrTab")+"\n# "+l("NewWin")+"\n# "+l("Sidebar")+"\n# "+l("BottomP");
      return tstr;
    }
    let prefId = "extensions.Custombuttons2@cbtnext.org.MABB.preferences";
    this.vDate = function( ) {
      let d = new Date();
      let _d = String( d.getDate() );
      let _m = String( d.getMonth()+1 );
      let _y = String( d.getFullYear() );
      _d = ( _d.length < 2 )? "0" + _d : _d;
      _m = ( _m.length < 2 )? "0" + _m : _m;
      return _y + _m + _d + ".01";
    }; // End function this.vDate()
    this.prefSelect=function() {
      var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                              .getService(Components.interfaces.nsIPromptService);
      var items = [l("NewTabFore"), l("NewTabBack"), l("CurrTab"), l("NewWin"), l("Sidebar"), l("BottomP")];
      var selectedL = {};
      var title = l("MabbPrefs");
      var msg = l("WhatisL");
      var result = prompts.select(null, title, msg, items.length, items, selectedL);
      if(result){
        var selectedM = {};
        msg = l("WhatisM");
        result = prompts.select(null, title, msg, items.length, items, selectedM);
      };
      if(result){
        var selectedR = {};
        msg = l("WhatisR");
        result = prompts.select(null, title, msg, items.length, items, selectedR);
      };
      if(result){
        var selectedD = {};
        msg = l("WhatisD");
        result = prompts.select(null, title, msg, items.length, items, selectedD);
      };
      if(result){
        var pNewTabF ="if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI(link);else gBrowser.selectedTab=gBrowser.addTab(link);";
        var pNewTabB ="if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI(link);else gBrowser.addTab(link);";
        var pCurTab ="loadURI(link);";
        var pNewWin ="window.open(link);";
        var pSidBar ="if(document.getElementById('sidebar-title').getAttribute('value')==this.label){toggleSidebar();}else{openWebPanel(this.label,link);}";
        var pBotPnl ="this.bottomPanel(link);";
        if(selectedL.value=="0")var prefLeft=pNewTabF;
        if(selectedM.value=="0")var prefMidd=pNewTabF;
        if(selectedR.value=="0")var prefRight=pNewTabF;
        if(selectedD.value=="0")var prefDble=pNewTabF;
        if(selectedL.value=="1")var prefLeft=pNewTabB;
        if(selectedM.value=="1")var prefMidd=pNewTabB;
        if(selectedR.value=="1")var prefRight=pNewTabB;
        if(selectedD.value=="1")var prefDble=pNewTabB;
        if(selectedL.value=="2")var prefLeft=pCurTab;
        if(selectedM.value=="2")var prefMidd=pCurTab;
        if(selectedR.value=="2")var prefRight=pCurTab;
        if(selectedD.value=="2")var prefDble=pCurTab;
        if(selectedL.value=="3")var prefLeft=pNewWin;
        if(selectedM.value=="3")var prefMidd=pNewWin;
        if(selectedR.value=="3")var prefRight=pNewWin;
        if(selectedD.value=="3")var prefDble=pNewWin;
        if(selectedL.value=="4")var prefLeft=pSidBar;
        if(selectedM.value=="4")var prefMidd=pSidBar;
        if(selectedR.value=="4")var prefRight=pSidBar;
        if(selectedD.value=="4")var prefDble=pSidBar;
        if(selectedL.value=="5")var prefLeft=pBotPnl;
        if(selectedM.value=="5")var prefMidd=pBotPnl;
        if(selectedR.value=="5")var prefRight=pBotPnl;
        if(selectedD.value=="5")var prefDble=pBotPnl;
        custombuttons.setPrefs( prefId,prefLeft+"~"+prefMidd+"~"+prefRight+"~"+prefDble);
        custombuttons.alertSlide(this.label,l("PrefSet"));
      }
      else{
        custombuttons.alertSlide(this.label,l("PrefSetN"));
        return;
      }
    }
    function getButtonParameters(name,img,code,Icode)
    {
      var ar=new Array;
      ar.push(name);
      ar.push(img);
      ar.push(code);
      ar.push(Icode);
      return {
        'name' :ar[0]||'',
        'image':ar[1]||'',
        'code' :ar[2]||'',
        'initCode' :ar[3]||''
      };
    }
    this.create_image = function(img) {
      this.CB=window.custombuttons;
        var aURL=img;
        var kIOContractID = "@mozilla.org/network/io-service;1";
        var kIOIID = Components. interfaces. nsIIOService;
        var IOSVC = Components. classes [kIOContractID]. getService (kIOIID);
        var chan = IOSVC. newChannel (aURL, null, null);
        var listener = new this.CB.imageLoadListener (chan);
        chan. notificationCallbacks = listener;
        listener.callBackFunction=this.setImageURL;
        chan. asyncOpen (listener, null);
    }
    this.setImageURL = function(img)
    {
      var tabPref=custombuttons.getPrefs( prefId ); //Gets tab preferences
      // Parses the Preference
      var cOne=tabPref.indexOf("~");
      var one=tabPref.substr(0,cOne);
      var cThr=tabPref.lastIndexOf("~");
      var div1=tabPref.substr(cOne,cThr);
      var div2=div1.substr(div1.indexOf("~")+1,div1.lastIndexOf("~"));
      var div3=div2.substr(div2.indexOf("~")+1,div2.lastIndexOf("~"));
      var two=div2.substr(0,div2.indexOf("~"));
      var thr=div3.substr(0,div3.indexOf("~"));
      var fou=tabPref.substr(cThr+1);
      let version = self.vDate();
      //Page attributes
      var addy = content.document.location.href;
      var name = content.document.title;
      name += "                                   ";
      name = name.substr( 0, 35 )
      if(one.match("selectedTab")) var left=l("Left")+": "+l("NewTabF");
      if(one.match("else gBrowser.add")) var left=l("Left")+": "+l("NewTabB");
      if(one=="loadURI(link);") var left=l("Left")+": "+l("CurrTab");
      if(one.match("window")) var left=l("Left")+": "+l("NewWin");
      if(one.match("sidebar-title")) var left=l("Left")+": "+l("Sidebar");
      if(one.match("this.bottomPanel")) var left=l("Left")+": "+l("BottomP");
      if(two.match("selectedTab")) var midd=l("Middle")+": "+l("NewTabF");
      if(two.match("else gBrowser.add")) var midd=l("Middle")+": "+l("NewTabB");
      if(two=="loadURI(link);") var midd=l("Middle")+": "+l("CurrTab");
      if(two.match("window")) var midd=l("Middle")+": "+l("NewWin");
      if(two.match("sidebar-title")) var midd=l("Middle")+": "+l("Sidebar");
      if(two.match("this.bottomPanel")) var midd=l("Middle")+": "+l("BottomP");
      if(thr.match("selectedTab")) var rght=l("Right")+": "+l("NewTabF");
      if(thr.match("else gBrowser.add")) var rght=l("Right")+": "+l("NewTabB");
      if(thr=="loadURI(link);") var rght=l("Right")+": "+l("CurrTab");
      if(thr.match("window")) var rght=l("Right")+": "+l("NewWin");
      if(thr.match("sidebar-title")) var rght=l("Right")+": "+l("Sidebar");
      if(thr.match("this.bottomPanel")) var rght=l("Right")+": "+l("BottomP");
      if(fou.match("selectedTab")) var dble=l("Double")+": "+l("NewTabF");
      if(fou.match("else gBrowser.add")) var dble=l("Double")+": "+l("NewTabB");
      if(fou=="loadURI(link);") var dble=l("Double")+": "+l("CurrTab");
      if(fou.match("window")) var dble=l("Double")+": "+l("NewWin");
      if(fou.match("sidebar-title")) var dble=l("Double")+": "+l("Sidebar");
      if(fou.match("this.bottomPanel")) var dble=l("Double")+": "+l("BottomP");
      // New Button's Button Code Section
          var code="/*Code*/\n\n//"+l("Docu");
          var Icode="/*Initialization code*/\n" +
      "if (typeof custombuttons.uCbuttonButes != 'function') {\n" +
      "  alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));\n" +
      "  this.disable(true);\n" +
      "}\n" +
      "\n" +
      "var link='"+addy+"';\n" +
      "\n" +
      "var Msg = createMsg(this.label);\n" +
      "\n" +
      "this.bottomPanel = function(url, contextmenu) {\n" +
      "  var panelID = 'bottom-panel';\n" +
      "  var gPanel = document.getElementById(panelID);\n" +
      "  if(gPanel) {\n" +
      "    if(gPanel.firstChild.getAttribute('src').indexOf(url) == -1) {\n" +
      "      gPanel.firstChild.setAttribute('src', url);\n" +
      "      if(contextmenu) gPanel.setAttribute('contextmenu', contextmenu);\n" +
      "      else gPanel.removeAttribute('contextmenu');\n" +
      "    } else {\n" +
      "      gPanel.parentNode.removeChild(gPanel.previousSibling);\n" +
      "      gPanel.parentNode.removeChild(gPanel);\n" +
      "    }\n" +
      "  } else {\n" +
      "    var tbb = document.createElement('toolbarbutton');\n" +
      "        tbb.className = 'tabs-closebutton';\n" +
      "        tbb.style.cursor = 'pointer';\n" +
      "        tbb.setAttribute('oncommand',\n" +
      "            'this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); ' +\n" +
      "            'this.parentNode.parentNode.removeChild(this.parentNode)');\n" +
      "    var spr = document.createElement('spacer');\n" +
      "        spr.setAttribute('flex', 1);\n" +
      "    var spl = document.createElement('splitter');\n" +
      "        spl.height = '28px';\n" +
      "        spl.appendChild(spr);\n" +
      "        spl.appendChild(tbb);\n" +
      "    var ifr = document.createElement('iframe');\n" +
      "        ifr.setAttribute('flex', 1);\n" +
      "        ifr.setAttribute('src', url);\n" +
      "    var box = document.createElement('box');\n" +
      "        box.id = panelID;\n" +
      "        box.height = '300px';\n" +
      "        box.appendChild(ifr);\n" +
      "    if(contextmenu) box.setAttribute('contextmenu', contextmenu);\n" +
      "    gBrowser.parentNode.appendChild(spl);\n" +
      "    gBrowser.parentNode.appendChild(box);\n" +
      "  }\n" +
      "}\n" +
      "\n" +
      "this.leftclick = function(evt) {\n" +
      "  "+one+"\n" +
      "};\n" +
      "\n" +
      "this.midclick = function(evt) {\n" +
      "  "+two+"\n" +
      "}; this.cleftclick = function(evt) { this.midclick(evt); }\n" +
      "\n" +
      "this.rightclick = function(evt) {\n" +
      "  "+thr+"\n" +
      "};\n" +
      "\n" +
      "this.leftDclick = function(evt) {\n" +
      "  "+fou+"\n" +
      "};\n" +
      "\n" +
      "this.tooltipText = this.label+'\\n"+left+"\\n"+dble+"\\n"+midd+"\\n"+rght+"';\n" +
      "\n" +
      "this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); \n" +
      "this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );\n" +
      "\n" +
      "this.style.opacity = '.65';\n" +
      "this.setAttribute('onmouseover', 'if (custombuttons) custombuttons.ButtonBrt(event);' );\n" +
      "this.setAttribute('onmouseout', 'if (custombuttons) custombuttons.ButtonDim(event);' );\n" +
      "\n" +
      "this.setAttribute('author','" + self.label + "');\n" +
      "this.setAttribute('version','" + version + "');\n" +
      "this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/make-bookmark-button.html');\n" +
      "this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');\n" +
      "this.setAttribute('status','Complete');\n" +
      "this.setAttribute('public',true);";
      let Help = left + "\n" + dble + "\n" + midd + "\n" + rght;
      createButton( name, img, code, Icode, Help, self );
    }
    this.bkmrk = function(evt) {
      var check=custombuttons.isPref( prefId );
      if (!check){
        this.prefSelect();
      }
      else {
        var favicon=document.getElementById("page-proxy-favicon").src;
        if (!document.getElementById("page-proxy-favicon").src) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes["@mozilla.org/filepicker;1"]
                       .createInstance(nsIFilePicker);
          fp.init(window, "Specify a Favicon: This site has no favicon!", nsIFilePicker.modeOpen);
          fp.filterIndex = 1;
          fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterImages);
          var rv = fp.show();
          if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) {
            var file = fp.file;
            var favicon = "file:///"+fp.file.path;
            this.create_image(favicon);
          }
          else {
            favicon="chrome://custombuttons/skin/CB2Icon-1.ico";
            this.create_image(favicon);
          }
        }
        else {
          this.create_image(favicon);
        }
      }
    }
    this.leftclick = function(evt){
      this.bkmrk(evt);
    };
    this.rightclick = function(evt){
      this.prefSelect();
    };
    this.label = l("Label_1");
    this.tooltipText = this.label+"\n"+l("Left")+": "+l("Create")+"\n"+l("Right")+": "+l("SetPrefs")+"\n"+l("SClickCat");
    this.setAttribute("Help", l("Help"));
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'if (custombuttons) custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'if (custombuttons) custombuttons.ButtonDim(event);' );
    this.setAttribute('author','nicholas,deepakjoshi04,squeaky,others');
    this.setAttribute('version','20090406.00');
    this.setAttribute('dependency','FF2.0*, FL1.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/make-bookmark-button.html');

    Help Tab

    Creates a button from the current page, using the url and favicon from the page.  This gets rid of the need for creating a button manually that simply opens a url.
    If the page does not have a favicon you will be prompted to insert one.  If you don't insert one, then it will use the custom button's default icon.
    Options:
    # New Tab (Foreground)
    # New Tab (Background)
    # Current Tab
    # New Window
    # Sidebar
    # Bottom Panel
  302. Make a SidebarButton

    Code Tab

    /*
    	Creates a button from the current page, 
    	using the url and favicon from the page. 
    	This gets rid of the need for creating a 
    	button manually that simply opens a url. 
    	The newly created buttons will work as follows:
    		L = Current Tab
    		M = New Tab
    		R = Toggle in the Sidebar
    	If the page does not have a favicon
    	you will be prompted to insert one.
    	If you don't insert one, then it will
    	use the custom button's default icon.
    */
    this.bkmrk(event);

    Initialization Tab

    var button=this;
    function createButton(button,name,img,code,Icode)
    {
    	       var nowButton=button;
    		var nowButtonNum=custombuttons.getNumber(nowButton.id);
    		var values=getButtonParameters(name,img,code,Icode);
    		var toolbar=nowButton.parentNode;
    		var newNum=custombuttons.min_button_number();
    		var newButton=custombuttons.createButton(newNum,values);
    		var newButton2=custombuttons.createButton(newNum,values);
    		var newButtonId=newButton.id;
    		//äîáàâëÿåì â palette
    		custombuttons.addToPalette(newButton2);
    		//â toolbar
    		var aBefore=nowButton.nextSibling;
    		custombuttons.insertToToolbar(toolbar,newButton,aBefore);
    		//Èñïðàâëÿåì currentSet äëÿ toolbar
    		var ar=toolbar.getAttribute('currentset').split(',');
    		var z=1;
    		for (var j=0;j<ar.length;j++){
    			if (ar[j]==nowButton.id){
    				z=j+1;
    				break;
    			}
    		}
    		ar.splice(z,0,newButtonId);
    		//èçáàâëÿåìñÿ îò ãëþêà ñ ñàìîïðîèçâîëüíûì ðàçìíîæåíèåì êíîïîê
    		var newSet='';
    		var temp={};
    		for (var i=0;i<ar.length;i++){
    			if (!(ar[i] in temp)){
    				temp[ar[i]]=true;
    				newSet+=ar[i];
    				if (i+1<ar.length) newSet+=',';
    			}
    		}
    		toolbar.setAttribute('currentset',newSet);		
    		document.persist(toolbar.id, 'currentset');
    		//åñëè ýòî custom-toolbar, òî èñïðàâëÿåì àòðèáóòû â toolbarSet...
    		var customindex=toolbar.getAttribute('customindex');
    		if (customindex>0){
    			var attrName='toolbar'+customindex;
    			var toolbarSet=document.getElementById('customToolbars');
    			var oldSet=toolbarSet.getAttribute(attrName);
    			newSet=oldSet.substring(0,oldSet.indexOf(':')+1)+newSet;
    			toolbarSet.setAttribute(attrName,newSet);
    			document.persist('customToolbars',attrName);
    		}
    		//Èñïðàâëåíèÿ äëÿ AIOS
    		if (document.getElementById('aiostbx-belowtabs-toolbox'))
    			persistCurrentSets();
    		custombuttons.saveButtonsToProfile();
    }			
    function getButtonParameters(name,img,code,Icode){
    		var ar=new Array;
    		ar.push(name);
     ar.push(img);
    ar.push(code);
    ar.push(Icode);
    		return {
    			'name' :ar[0]||'',
    			'image':ar[1]||'',
    			'code' :ar[2]||'',
    			'initCode' :ar[3]||''
    		};
    }
    this.create_image=function(img)
    {
    		this.CB=window.custombuttons;
    		var aURL=img;
    		var kIOContractID = "@mozilla.org/network/io-service;1";
    		var kIOIID = Components. interfaces. nsIIOService;
    		var IOSVC = Components. classes [kIOContractID]. getService (kIOIID);
    		var chan = IOSVC. newChannel (aURL, null, null);
    		var listener = new this.CB.imageLoadListener (chan);
    		chan. notificationCallbacks = listener;
    		listener.callBackFunction=this.setImageURL;
    		chan. asyncOpen (listener, null);
    }
    this.setImageURL=function(img)
    {
    var name=content.document.title;
    var code=" ";
    var Icode="\n this.quot = function(evt) {\n\nvar link=\""+content.document.location.href+"\";\nvar label=\""+name+"\";\nvar head =(document.getElementById('sidebar-title').getAttribute('value') == label); \n\n  switch(evt.button) {\n\ncase 2:\n\nthis.showPopup(this);\n    return;\n\ncase 0:\n\n   if (!head) {\n   openWebPanel();\n   var sbLoc = document.getElementById('sidebar').contentDocument.location;\n   sbLoc.href = link;\n   document.getElementById('sidebar-title').value = label;\n   document.getElementById('sidebar-box').hidden = false;\n   document.getElementById('sidebar-box').collapsed = false;\n   document.getElementById('sidebar-splitter').hidden = false;\n   return;\n   }\n\n   if (head) {\n   document.getElementById('sidebar-title').value = null;\n   document.getElementById('sidebar-box').hidden = true;\n   document.getElementById('sidebar-box').collapsed = true;\n   document.getElementById('sidebar-splitter').hidden = true;\n      var sbLoc = document.getElementById('sidebar').contentDocument.location;\n   sbLoc.href = link;\n   toggleSidebar();\n   }\n\nbreak;\n\n  }\n}\nthis.showPopup = function(node) {\n  var popup = document.getElementById('custombuttons-contextpopup');\n  var x = node.boxObject.x;\n  var y = node.boxObject.y + node.boxObject.height;\n document.popupNode = node;\n  popup.showPopup(node, x, y, 'popup', null, null);\n}\n\nthis.setAttribute('onclick', 'this.quot(event);');\nthis.setAttribute('context', '');\nthis.tooltipText = '"+name+"';\n\n}"; 
    createButton(button,name,img,code,Icode);
    }
    this.bkmrk=function(evt) {
    var favicon=document.getElementById("page-proxy-favicon").src;
    if (!document.getElementById("page-proxy-favicon").src) {
    favicon=prompt('This site has no favicon! \n If you would like to specify one\, please do so:\n\n\n\n For files use\, \"file:///\" and the location\n\nOr use a URL instead', 'file:///', 'Specify a Favicon');
    if ((favicon.match('file:///.')) || (favicon.match('http://'))) {
    this.create_image(favicon);
    return;
    }
    if (favicon == null) {
    return;
    }
    else {
    favicon="chrome://custombuttons/skin/button.png";
    this.create_image(favicon);
    }
    }
    else {
    this.create_image(favicon);
    }
    }
    this.setAttribute('author','LRodman');
    this.setAttribute('version','1.0alpha');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sidebarbutton-maker-several-example-sidebar-buttons.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

  303. Make Bookmark

    Code Tab

    /*Code*/

    Initialization Tab

    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    var cb=custombuttons,self=this,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    function l(str) {
      self.properties = {
        en_US:{      // English US translation by nicholas
          Label_1:     'Make Bookmark',
          Left:        'L',
          Middle:      'M',
          Right:       'R',
          Double:      'D',
          SClickCat:   '%s', // converts to "Shift-click: Custom Buttons² Context Menu"
          NewTab_n:    'New Tab',
          ForeG_F:     'Foreground',
          BackG_B:     'Background',
          AbbrForeG_f: 'F', // Foreground Abbreviated
          AbbrBackG_b: 'B', // Background Abbreviated
          NewTabFore:  '%n (%F)', // converts to "New Tab (Foreground)"
          NewTabBack:  '%n (%B)', // converts to "New Tab (Background)"
          NewTabF:     '%n (%f)', // converts to "New Tab (F)"
          NewTabB:     '%n (%b)', // converts to "New Tab (B)"
          CurrTab:     'Current Tab',
          NewWin:      'New Window',
          Sidebar:     'Sidebar',
          BottomP:     'Bottom Panel',
          Nothing:     'Nothing',
          Prefs_2:     'Preferences',
          MabbPrefs:   '%1 %2', // Converts to "Make a Bookmark Button Preferences"
          Whatis_3:    'What is your preference for',
          WhatisL:     '%3 %4?', // Converts to "What is your preference for ...?"
          WhatisM:     '%3 %5?', // Converts to "What is your preference for ...?"
          WhatisR:     '%3 %6?', // Converts to "What is your preference for ...?"
          WhatisD:     '%3 %7?', // Converts to "What is your preference for ...?"
          LClick_4:    'Left-click',
          MClick_5:    'Middle-click',
          RClick_6:    'Right-click',
          DClick_7:    'Double-click',
          ShiftC_s:    'Shift-click',
          PrefSet:     'Your Preferences Have Been Set',
          PrefSetN:    'Your Preferences Have NOT Been Set',
          Docu:        'This button was auto-created with the %1', // %1 converts to "Make a Bookmark Button"
          Create:      'Create a New Bookmark Button',
          SetPrefs:    'Set Preferences for Created Buttons',
          CBContext_c: 'Custom Buttons² Context Menu',
          Help:        '',
          Help1:       "Creates a button from the current page, using the url and favicon from the page.  This gets rid of the need for creating a button manually that simply opens a url.",
          Help2:       "If the page does not have a favicon you will be prompted to insert one.  If you don't insert one, then it will use the custom button's default icon.",
          Help3:       "Options:",
        },
        ja:{         // 
          Left:        '左',
          Middle:      '中',
          Right:       '右',
        },
        fr_FR:{      // Traduction française fr par 
          Left:        'G',
          Middle:      'M',
          Right:       'D',
        },
        nl_NL:{      // Nederlandse vertaling door 
          Left:        'L',
          Middle:      'M',
          Right:       'R',
        },
        sv_SE:{      // 
          Left:        'V',
          Right:       'L',
        },
        es_ES:{      // 
          Left:        'I',
          Middle:      'M',
          Right:       'D',
        },
        es_AR:{      // 
          Left:        'I',
          Middle:      'M',
          Right:       'D',
        },
      };
      var tstr = cb.getLocalString(self, str);
      // Operations to handle replacements
      if (tstr.match(/[%]\w{1}/g)) {
        lang = (typeof self.properties[lang] != "undefined") ? lang : "en_US";
        for(prop in self.properties[lang]) {
          if ((prop.match(/[_]\w{1}$/)) && ((prop.substr(prop.lastIndexOf("_")+1)) == (tstr.substring(tstr.indexOf("%")+1, tstr.indexOf("%")+2)))) {
            var tok = tstr.substring(tstr.indexOf("%"), tstr.indexOf("%")+2);
            tstr = tstr.replace(tok, l(prop));
          }
        }
      }
      if (str == "Help") tstr = l("Help1")+"\n\n"+l("Help2")+"\n\n"+l("Help3")+"\n\n# "+l("NewTabFore")+"\n# "+l("NewTabBack")+"\n# "+l("CurrTab")+"\n# "+l("NewWin")+"\n# "+l("Sidebar")+"\n# "+l("BottomP")+"\n# "+l("Nothing");
      return tstr;
    }
    let prefId = "extensions.Custombuttons2@cbtnext.org.MABB.preferences";
    this.vDate = function( ) {
      let d = new Date();
      let _d = String( d.getDate() );
      let _m = String( d.getMonth()+1 );
      let _y = String( d.getFullYear() );
      _d = ( _d.length < 2 )? "0" + _d : _d;
      _m = ( _m.length < 2 )? "0" + _m : _m;
      return _y + _m + _d + ".01";
    }; // End function this.vDate()
    this.prefSelect=function() {
      var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                              .getService(Components.interfaces.nsIPromptService);
      var items = [l("NewTabFore"), l("NewTabBack"), l("CurrTab"), l("NewWin"), l("Sidebar"), l("BottomP"), l("Nothing")];
      var selectedL = {};
      var title = l("MabbPrefs");
      var msg = l("WhatisL");
      var result = prompts.select(null, title, msg, items.length, items, selectedL);
      if(result){
        var selectedM = {};
        msg = l("WhatisM");
        result = prompts.select(null, title, msg, items.length, items, selectedM);
      };
      if(result){
        var selectedR = {};
        msg = l("WhatisR");
        result = prompts.select(null, title, msg, items.length, items, selectedR);
      };
      if(result){
        var selectedD = {};
        msg = l("WhatisD");
        result = prompts.select(null, title, msg, items.length, items, selectedD);
      };
      if(result){
        var pNewTabF ="if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI(link);else gBrowser.selectedTab=gBrowser.addTab(link);";
        var pNewTabB ="if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI(link);else gBrowser.addTab(link);";
        var pCurTab ="loadURI(link);";
        var pNewWin ="window.open(link);";
        var pSidBar ="if(document.getElementById('sidebar-title').getAttribute('value')==this.label){toggleSidebar();}else{openWebPanel(this.label,link);}";
        var pBotPnl ="this.bottomPanel(link);";
        var pNOP ="/*Nothing*/";
        if(selectedL.value=="0")var prefLeft=pNewTabF;
        if(selectedM.value=="0")var prefMidd=pNewTabF;
        if(selectedR.value=="0")var prefRight=pNewTabF;
        if(selectedD.value=="0")var prefDble=pNewTabF;
        if(selectedL.value=="1")var prefLeft=pNewTabB;
        if(selectedM.value=="1")var prefMidd=pNewTabB;
        if(selectedR.value=="1")var prefRight=pNewTabB;
        if(selectedD.value=="1")var prefDble=pNewTabB;
        if(selectedL.value=="2")var prefLeft=pCurTab;
        if(selectedM.value=="2")var prefMidd=pCurTab;
        if(selectedR.value=="2")var prefRight=pCurTab;
        if(selectedD.value=="2")var prefDble=pCurTab;
        if(selectedL.value=="3")var prefLeft=pNewWin;
        if(selectedM.value=="3")var prefMidd=pNewWin;
        if(selectedR.value=="3")var prefRight=pNewWin;
        if(selectedD.value=="3")var prefDble=pNewWin;
        if(selectedL.value=="4")var prefLeft=pSidBar;
        if(selectedM.value=="4")var prefMidd=pSidBar;
        if(selectedR.value=="4")var prefRight=pSidBar;
        if(selectedD.value=="4")var prefDble=pSidBar;
        if(selectedL.value=="5")var prefLeft=pBotPnl;
        if(selectedM.value=="5")var prefMidd=pBotPnl;
        if(selectedR.value=="5")var prefRight=pBotPnl;
        if(selectedD.value=="5")var prefDble=pBotPnl;
        if(selectedL.value=="6")var prefLeft=pNOP;
        if(selectedM.value=="6")var prefMidd=pNOP;
        if(selectedR.value=="6")var prefRight=pNOP;
        if(selectedD.value=="6")var prefDble=pNOP;
        custombuttons.setPrefs( prefId,prefLeft+"~"+prefMidd+"~"+prefRight+"~"+prefDble);
        custombuttons.alertSlide(this.label,l("PrefSet"));
      }
      else{
        custombuttons.alertSlide(this.label,l("PrefSetN"));
        return;
      }
    }
    function getButtonParameters(name,img,code,Icode)
    {
      var ar=new Array;
      ar.push(name);
      ar.push(img);
      ar.push(code);
      ar.push(Icode);
      return {
        'name' :ar[0]||'',
        'image':ar[1]||'',
        'code' :ar[2]||'',
        'initCode' :ar[3]||''
      };
    }
    this.create_image = function(img) {
      this.CB=window.custombuttons;
        var aURL=img;
        var kIOContractID = "@mozilla.org/network/io-service;1";
        var kIOIID = Components. interfaces. nsIIOService;
        var IOSVC = Components. classes [kIOContractID]. getService (kIOIID);
        var chan = IOSVC. newChannel (aURL, null, null);
        var listener = new this.CB.imageLoadListener (chan);
        chan. notificationCallbacks = listener;
        listener.callBackFunction=this.setImageURL;
        chan. asyncOpen (listener, null);
    }
    this.setImageURL = function(img)
    {
      var tabPref=custombuttons.getPrefs( prefId ); //Gets tab preferences
      // Parses the Preference
      var cOne=tabPref.indexOf("~");
      var one=tabPref.substr(0,cOne);
      var cThr=tabPref.lastIndexOf("~");
      var div1=tabPref.substr(cOne,cThr);
      var div2=div1.substr(div1.indexOf("~")+1,div1.lastIndexOf("~"));
      var div3=div2.substr(div2.indexOf("~")+1,div2.lastIndexOf("~"));
      var two=div2.substr(0,div2.indexOf("~"));
      var thr=div3.substr(0,div3.indexOf("~"));
      var fou=tabPref.substr(cThr+1);
      let version = self.vDate();
      //Page attributes
      var addy = content.document.location.href;
      var name = content.document.title;
      name += "                                   ";
      name = name.substr( 0, 35 )
      var bUseBottomPnl = false;
      if(one.match("selectedTab")) var left=l("Left")+": "+l("NewTabF");
      if(one.match("else gBrowser.add")) var left=l("Left")+": "+l("NewTabB");
      if(one=="loadURI(link);") var left=l("Left")+": "+l("CurrTab");
      if(one.match("window")) var left=l("Left")+": "+l("NewWin");
      if(one.match("sidebar-title")) var left=l("Left")+": "+l("Sidebar");
      if(one.match("this.bottomPanel")) { var left=l("Left")+": "+l("BottomP"); bUseBottomPnl=true; }
      if(two.match("selectedTab")) var midd=l("Middle")+": "+l("NewTabF");
      if(two.match("else gBrowser.add")) var midd=l("Middle")+": "+l("NewTabB");
      if(two=="loadURI(link);") var midd=l("Middle")+": "+l("CurrTab");
      if(two.match("window")) var midd=l("Middle")+": "+l("NewWin");
      if(two.match("sidebar-title")) var midd=l("Middle")+": "+l("Sidebar");
      if(two.match("this.bottomPanel")) { var midd=l("Middle")+": "+l("BottomP"); bUseBottomPnl=true; }
      if(thr.match("selectedTab")) var rght=l("Right")+": "+l("NewTabF");
      if(thr.match("else gBrowser.add")) var rght=l("Right")+": "+l("NewTabB");
      if(thr=="loadURI(link);") var rght=l("Right")+": "+l("CurrTab");
      if(thr.match("window")) var rght=l("Right")+": "+l("NewWin");
      if(thr.match("sidebar-title")) var rght=l("Right")+": "+l("Sidebar");
      if(thr.match("this.bottomPanel")) { var rght=l("Right")+": "+l("BottomP"); bUseBottomPnl=true; }
      if(fou.match("selectedTab")) var dble=l("Double")+": "+l("NewTabF");
      if(fou.match("else gBrowser.add")) var dble=l("Double")+": "+l("NewTabB");
      if(fou=="loadURI(link);") var dble=l("Double")+": "+l("CurrTab");
      if(fou.match("window")) var dble=l("Double")+": "+l("NewWin");
      if(fou.match("sidebar-title")) var dble=l("Double")+": "+l("Sidebar");
      if(fou.match("this.bottomPanel")) { var dble=l("Double")+": "+l("BottomP"); bUseBottomPnl=true; }
      // New Button's Button Code Section
          var code="/*Code*/\n\n//"+l("Docu");
          var Icode="/*Initialization code*/\n" +
      "if (typeof custombuttons.uCbuttonButes != 'function') {\n" +
      "  alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));\n" +
      "  this.disable(true);\n" +
      "}\n" +
      "\n" +
      "var link='"+addy+"';\n" +
      "\n" +
      "var Msg = createMsg(this.label);\n" +
      "\n" +
      (bUseBottomPnl ?
      "this.bottomPanel = function(url, contextmenu) {\n" +
      "  var panelID = 'bottom-panel';\n" +
      "  var gPanel = document.getElementById(panelID);\n" +
      "  if(gPanel) {\n" +
      "    if(gPanel.firstChild.getAttribute('src').indexOf(url) == -1) {\n" +
      "      gPanel.firstChild.setAttribute('src', url);\n" +
      "      if(contextmenu) gPanel.setAttribute('contextmenu', contextmenu);\n" +
      "      else gPanel.removeAttribute('contextmenu');\n" +
      "    } else {\n" +
      "      gPanel.parentNode.removeChild(gPanel.previousSibling);\n" +
      "      gPanel.parentNode.removeChild(gPanel);\n" +
      "    }\n" +
      "  } else {\n" +
      "    var tbb = document.createElement('toolbarbutton');\n" +
      "        tbb.className = 'tabs-closebutton';\n" +
      "        tbb.style.cursor = 'pointer';\n" +
      "        tbb.setAttribute('oncommand',\n" +
      "            'this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); ' +\n" +
      "            'this.parentNode.parentNode.removeChild(this.parentNode)');\n" +
      "    var spr = document.createElement('spacer');\n" +
      "        spr.setAttribute('flex', 1);\n" +
      "    var spl = document.createElement('splitter');\n" +
      "        spl.height = '28px';\n" +
      "        spl.appendChild(spr);\n" +
      "        spl.appendChild(tbb);\n" +
      "    var ifr = document.createElement('iframe');\n" +
      "        ifr.setAttribute('flex', 1);\n" +
      "        ifr.setAttribute('src', url);\n" +
      "    var box = document.createElement('box');\n" +
      "        box.id = panelID;\n" +
      "        box.height = '300px';\n" +
      "        box.appendChild(ifr);\n" +
      "    if(contextmenu) box.setAttribute('contextmenu', contextmenu);\n" +
      "    gBrowser.parentNode.appendChild(spl);\n" +
      "    gBrowser.parentNode.appendChild(box);\n" +
      "  }\n" +
      "}\n" : "") +
      "\n" +
      (left ? "this.leftclick = function(evt) {\n" +
      "  "+one+"\n" +
      "};\n" +
      "\n" : "") +
      (midd ? "this.midclick = function(evt) {\n" +
      "  "+two+"\n" +
      "}; this.cleftclick = function(evt) { this.midclick(evt); }\n" +
      "\n" : "") +
      (rght ? "this.rightclick = function(evt) {\n" +
      "  "+thr+"\n" +
      "};\n" +
      "\n" : "") +
      (dble ? "this.leftDclick = function(evt) {\n" +
      "  "+fou+"\n" +
      "};\n" +
      "\n" : "") +
      ("this.tooltipText = this.label+'\\n"+left+"\\n"+dble+"\\n"+midd+"\\n"+rght+"';\n").replace(/\\nundefined/g,'') +
      "\n" +
      "this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); \n" +
      "this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );\n" +
      "\n" +
      "this.style.opacity = '.65';\n" +
      "this.setAttribute('onmouseover', 'if (custombuttons) custombuttons.ButtonBrt(event);' );\n" +
      "this.setAttribute('onmouseout', 'if (custombuttons) custombuttons.ButtonDim(event);' );\n" +
      "\n" +
      "this.setAttribute('author','" + self.label + "');\n" +
      "this.setAttribute('version','" + version + "');\n" +
      "this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/make-bookmark-button.html');\n" +
      "this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');\n" +
      "this.setAttribute('status','Complete');\n" +
      "this.setAttribute('public',true);";
      let Help = left + "\n" + dble + "\n" + midd + "\n" + rght;
      createButton( name, img, code, Icode, Help, self );
    }
    this.bkmrk = function(evt) {
      var check=custombuttons.isPref( prefId );
      if (!check){
        this.prefSelect();
      }
      else {
        var favicon=document.getElementById("page-proxy-favicon").src;
        if (!document.getElementById("page-proxy-favicon").src) {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes["@mozilla.org/filepicker;1"]
                       .createInstance(nsIFilePicker);
          fp.init(window, "Specify a Favicon: This site has no favicon!", nsIFilePicker.modeOpen);
          fp.filterIndex = 1;
          fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterImages);
          var rv = fp.show();
          if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) {
            var file = fp.file;
            var favicon = "file:///"+fp.file.path;
            this.create_image(favicon);
          }
          else {
            favicon="chrome://custombuttons/skin/CB2Icon-1.ico";
            this.create_image(favicon);
          }
        }
        else {
          this.create_image(favicon);
        }
      }
    }
    this.leftclick = function(evt){
      this.bkmrk(evt);
    };
    this.midclick = function(evt){
      this.prefSelect();
    };
    this.sleftclick = this.midclick;
    this.label = l("Label_1");
    this.tooltipText = this.label+"\n"+l("Left")+": "+l("Create")+"\n"+l("SClickCat")+": "+l("SetPrefs")+"\n"+l("Middle")+": "+l("SetPrefs")+"\n";
    this.setAttribute("Help", l("Help"));
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'if (custombuttons) custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'if (custombuttons) custombuttons.ButtonDim(event);' );
    this.setAttribute('author','nicholas,deepakjoshi04,squeaky,others');
    this.setAttribute('version','20090406.00');
    this.setAttribute('dependency','FF2.0*, FL1.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/make-bookmark-button.html');

    Help Tab

    Creates a button from the current page, using the url and favicon from the page.  This gets rid of the need for creating a button manually that simply opens a url.
    If the page does not have a favicon you will be prompted to insert one.  If you don't insert one, then it will use the custom button's default icon.
    Options:
    # New Tab (Foreground)
    # New Tab (Background)
    # Current Tab
    # New Window
    # Sidebar
    # Bottom Panel
    # Nothing
  304. MediaWiki TOC

    Code Tab

    /////> This space for rent <\\\\\

    Initialization Tab

    function addMenuItem(aNode, aLabel, aHref, aPadding) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.className = "menuitem-iconic";
      mi.setAttribute("crop", "end");
      mi.setAttribute("label", aLabel);
      mi.setAttribute("href", aHref);
      mi.tooltipText = aLabel;
      mi.style.paddingLeft = (aPadding - 1) + "em";
      mi.style.fontWeight = (gURLBar.value == aHref) ? "bold" : "normal";
      mi.style.border = (gURLBar.value == aHref) ? "1px inset menu" : "none";
    }
    this.populateMenu = function(aNode, aEvent) {
      while(aNode.hasChildNodes()) aNode.removeChild(aNode.firstChild);
      var XPath = "//table[@id='toc']//li/a/span[@class='toctext']/text()";
      var tocText = content.document.evaluate(XPath, content.document, null, 6, null);
      if(!tocText.snapshotLength) return;
      for(var i = 0; i < tocText.snapshotLength; i++) {
        var text = tocText.snapshotItem(i).nodeValue;
        var href = tocText.snapshotItem(i).parentNode.parentNode.href;
        var padding = tocText.snapshotItem(i).parentNode.parentNode.parentNode.className.match(/\d+/);
        addMenuItem(aNode, text, href, padding);
      }
    }
    var mp = this.appendChild(document.createElement("menupopup"));
    mp.setAttribute("style", "max-width: 300px; max-height: 500px;");
    mp.setAttribute("onpopupshowing",
      "this.parentNode.populateMenu(this, event)");
    mp.setAttribute("oncommand", "loadURI(event.target.getAttribute('href'))");
    this.type = "menu";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/mediawiki-toc.html');

    Help Tab

  305. meme proxy button

    Code Tab

    var proxy = "https://meme2028.appspot.com/";	// The address of the proxy we are using.
    var url = content.document.location;		// The current URL.
    if ((url != "") && (url != "about:blank"))
    	content.document.location = url.href.replace(url.protocol+"//",proxy);	// Proxify the current URL.
    else
    	content.document.location = proxy;					// Open the proxy's home-page.

    Initialization Tab

    // ***** ATTRIBUTES ***** //
    this.tooltipText = 'Click the button to proxify the current URL via "https://meme2028.appspot.com/"';
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1 (2009-03-24)');
    this.setAttribute('dependency','FF3.0*, FF2.0*, CB2 2.0.9*');
    this.setAttribute('status','Public');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/meme-proxy-button.html');

    Help Tab

    Click the button to replace the protocol+"//" of the current URL with "https://meme2028.appspot.com/" and load the new URL.
    In other words, "http://bbc.co.uk" will become "https://meme2028.appspot.com/bbc.co.uk".
  306. Menu Editor

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    toOpenWindowByType("menuedit:options", "chrome://menuedit/content/menueditprefs.xul");
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menu-editor-button.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  307. Menu Editor + Menumanipulator

    Code Tab

    /*
    	Custom Button authored by xpi
    		L = Menu Editor
    		M = Custom Buttons Menu
    		R = Menumanipulator
    		Shift-Click = Custom Buttons Menu
    */

    Initialization Tab

    this.quot = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
      switch(evt.button) {
    case 0:
    openDialog('chrome://menuedit/content/menueditprefs.xul', 'menueditor', 'chrome, resizable, centerscreen, dialog=0, modal=0, close');
    break;
    case 1:
    this.showPopup(this);
    break;
    case 2:
    openDialog('chrome://menumanipulator/content/main.xul', 'menumanipulator', 'chrome, resizable, centerscreen, dialog=0, modal=0, close');
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.quot(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L = Menu Editor | R = Menumanipulator";
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menu-editor-menumanipulator-xpi.html');

    Help Tab

  308. Menu Editor, Keyconfig & Organize Status Bar All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    toOpenWindowByType("menuedit:options", "chrome://menuedit/content/menueditprefs.xul");
    }
    this.rightclick = function(e) {
    document.getElementById('osb_tools_menuitem').click();
    }
    this.midclick = function(e) {
    document.getElementById('keyconfig').click();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Menu Editor|M: Keyconfig|R: Organize Status Bar";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menu-editor-keyconfig-organize-status-bar-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  309. menu or tab bar toggler

    Code Tab

    /*
      L: Toggle tab bar
      R: Toggle menu bar
      Rawny ^^
    */
    

    Initialization Tab

    // ***** FUNCTIONS ***** //
    function tbtoggle(thisBTN)
    {
    	thisBTN.checked = !thisBTN.checked;
    	if ( thisBTN.checked )
    	{
    		gBrowser.setStripVisibilityTo(false);
    		gBrowser.mPrefs.setBoolPref("browser.tabs.forceHide", true);
    	}
    	else
    	{
    		gBrowser.setStripVisibilityTo(true);
    		gBrowser.mPrefs.setBoolPref("browser.tabs.forceHide", false);
    	}
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
      tbtoggle(this);
    }
    this.rightclick = function(evt)
    {
      const toolbar = document.getElementById("toolbar-menubar");
      toolbar.collapsed = !toolbar.collapsed;
    }
    // ***** INITIALISATION ***** //
    this.tooltipText = "L: Toggle tab bar"+"\n"+"R: Toggle menu bar";
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, jet-plane');
    this.setAttribute('version','3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menu-or-tab-bar-toggler-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    L: Toggle tab bar
    R: Toggle menu bar
  310. MenuManipulator

    Code Tab

    document.getElementById('menumanipulator').click();

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080914.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menumanipulator-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  311. MouseHunt

    Code Tab

    /*Code*/
    const toolbar = document.getElementById("FC_Toolbar916ab64cbc3e471b8e6029551922a7ba");
    toolbar.collapsed = !toolbar.collapsed;
    //===================================================================

    Initialization Tab

    /*Initialization code*/
    /*------------------ Custom Buttons Attributes Block Start ------------------*/
    this.setAttribute('author','jw25, Demono');
    this.setAttribute('version','20091004.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/en-us/forum/buttons/buttons-database/mousehunt-toolbar-toggle.html');
    this.setAttribute('dependency','MouseHunt Toolbar');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*------------------- Custom Buttons Attributes Block End -------------------*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);

    Help Tab

    /*Help*/
    Left-click toggle the MouseHunt toolbar.
    MouseHunt is a popular game on FaceBook.
    The toolbar this button toggles can be found at: http://apps.facebook.com/mousehunt/toolbar.php
  312. MouseHunt

    Code Tab

    /*Code*/
    const toolbar = document.getElementById("FC_Toolbar916ab64cbc3e471b8e6029551922a7ba");
    toolbar.collapsed = !toolbar.collapsed;
    //===================================================================

    Initialization Tab

    /*Initialization code*/
    /*------------------ Custom Buttons Attributes Block Start ------------------*/
    this.setAttribute('author','jw25, Demono');
    this.setAttribute('version','20091004.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/mousehunt-toolbar-toggle.html');
    this.setAttribute('dependency','MouseHunt Toolbar');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*------------------- Custom Buttons Attributes Block End -------------------*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);

    Help Tab

    /*Help*/
    Left-click toggle the MouseHunt toolbar.
    MouseHunt is a popular game on FaceBook.
    The toolbar this button toggles can be found at: http://apps.facebook.com/mousehunt/toolbar.php
  313. Mozilla links

    Code Tab

    this.value="http://www.mozilla.org/";
    gBrowser.selectedTab = gBrowser.addTab(event.target.value);

    Initialization Tab

    var apps,srcUrl,MItem,mPop;
    //------menu items--------
    apps=new Array;
    apps.push(['Mozilla.com','http://www.mozilla.com/']);
    apps.push(['Mozilla Addons','http://addons.mozilla.org']);
    apps.push(['Mozilla Developer','https://developer.mozilla.org']);
    apps.push(['Mozilla Zine','http://www.mozillazine.org/']);
    //------/menu items-------
    MItem=function(label,path){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      mItem.id = path;
      mItem.value = path;
      mItem.tooltipText = path;
      return mItem;
    }
      this.tooltipText ="Mozilla links";
    //this.orient="vertical";
    mPop=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mPop.appendChild(document.createElement('menuseparator'));
     }else{
      if (!apps[i] [2]) apps[i] [2]=srcUrl;
      mPop.appendChild(MItem(apps[i] [0],apps[i] [1]));
     }
    }
    this.appendChild(mPop);
    this.type = "menu-button";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/link-menus.html');

    Help Tab

  314. My Config

    Code Tab

    Local_Install.openMyConfig();

    Initialization Tab

    if(typeof Local_Install != "object") {
      var ext = "MR Tech Local Install";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    var test = document.getElementById("cbContext-MyConfig");
    if(test) test.parentNode.removeChild(test);
    var cbPopup = document.getElementById("custombuttons-contextpopup").cloneNode(true);
    var cbItems = cbPopup.childNodes.length - 2;
    var subPopup = document.createElement("menupopup");
    subPopup.setAttribute("onpopupshowing", "event.stopPropagation();");
    for(var i = 0; i < cbItems; i++) {
      subPopup.appendChild(cbPopup.firstChild);
    }
    var subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.appendChild(subPopup);
    var myConfigPopup = document.getElementById("myConfig-context");
    var popup = myConfigPopup.cloneNode(true);
    popup.id = "cbContext-MyConfig";
    popup.appendChild(document.createElement("menuseparator"));
    popup.appendChild(subMenu);
    myConfigPopup.parentNode.appendChild(popup);
    this.setAttribute("context", popup.id);
    this.onclick = function(event) {
      if(event.button == 1)
        gBrowser.selectedTab = gBrowser.addTab("chrome://local_install/content/infolister.xul");
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/my-config-buttons.html');

    Help Tab

  315. My Config

    Code Tab

    Local_Install.openMyConfig();

    Initialization Tab

    if(typeof Local_Install != "object") {
      var ext = "MR Tech Local Install";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    var test = document.getElementById("cbContext-MyConfig2");
    if(test) test.parentNode.removeChild(test);
    var subPopup, subMenu, mPopup;
    subPopup = document.createElement("menupopup");
    subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.appendChild(subPopup);
    mPopup = document.createElement("popup");
    mPopup.id = "cbContext-MyConfig2";
    var mID = ["new-exportConfig-popup", "new-copyAgentBuildID-popup"];
    for(var i = 0; i < mID.length; i++)
      copyMenuItems(mPopup, mID[i], true);
    copyMenuItems(subPopup, "custombuttons-contextpopup");
    mPopup.appendChild(subMenu);
    document.getElementById("mainPopupSet").appendChild(mPopup);
    this.setAttribute("context", mPopup.id);
    this.onclick = function(aEvent) {
      if(aEvent.button == 1)
        gBrowser.selectedTab = gBrowser.addTab("chrome://local_install/content/infolister.xul");
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/my-config-buttons.html');

    Help Tab

  316. My Logins

    Code Tab

    /*Code*/

    Initialization Tab

    var apps,srcUrl,MItem,mPop;
    function onLoad(uname,pass)
    {
    alert("Please wait a sec..");
    form_fill(uname,pass);
    }
    function loadPage(evt)
    {
    	var url=evt.target.value;
    	var name=evt.target.name;
    	var pass=evt.target.pass;
    	gBrowser.selectedTab=gBrowser.addTab(url);
    	function load(){
    	     if (content.document.title.length>0)
    	     {
    		onLoad(name,pass);
    	     } else {
    		 setTimeout(load.bind(this),1000);
    	     }
    	};
    	load();
    }
    function submit_form()
    {
    	submit_it(gBrowser.contentDocument.getElementsByTagName("BUTTON"));
    	submit_it(gBrowser.contentDocument.getElementsByTagName("INPUT"));	
    }
    function submit_it(obj)
    {
    for(var i=0;i<obj.length;i++)
    	{
    		if(obj[i].type=="submit")
    		{
    			obj[i].click();
    			break;
    		}
    		if(obj[i].type!="hidden" && (obj[i].type=="button"))
    			{
    				var n=obj[i].name.toLowerCase();
    				var v=obj[i].value.toLowerCase();
    		if(n.match("submit") || n.match("login") ||v.match("submit") ||v.match("login")||n.match("sign") ||v.match("sign"))
    			{
    				obj[i].click();
    				break;
    			}	
    			}
    	}
    }
    function form_fill(username,passwd)
    {
    	var obj= gBrowser.contentDocument.getElementsByTagName("INPUT");
    	for(var i=0;i<obj.length;i++)
    	{
    		if(obj[i].type!="hidden")
    		{
    			if(obj[i].type=="text")
    			{
    				var n=obj[i].name.toLowerCase();
    				if(n.match("name") || n.match("login")||n.match("mail"))
    				obj[i].value=username;
    			}
    			if(obj[i].type=="password")
    			obj[i].value=passwd;
    		}
    	}
    submit_form();
    }
    function getIndex(opt,value)
    {
    	for( var i=0;i<opt.length;i++)
    	{
    		if(opt[i].text==value)
    		return i;
    	}
    }
    //------menu items--------
    var Img=this.image;
    apps=new Array;
    apps.push(['Yahoo','http://www.yahoomail.com','username','pass',Img]);
    apps.push(['Gmail','http://www.gmail.com','username','pass',Img]);
    apps.push(['Rediff','http://www.rediffmail.com','username','pass',Img]);
    apps.push(['separator']);
    //------/menu items-------
    MItem=function(value){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',apps[value] [0]);
      mItem.value = apps[value] [1];
      mItem.name= apps[value] [2];
      mItem.pass= apps[value] [3];
      mItem.tooltipText = apps[value] [0];
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
     mItem.setAttribute('image',apps[value] [1]);
      return mItem;
    }
    //this.orient="vertical";
    mPop=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mPop.appendChild(document.createElement('menuseparator'));
     }else{
      mPop.appendChild(MItem(i));
     }
    }
    this.siteGo=function(evt)
    {
    loadPage(evt);
    }
    this.appendChild(mPop);
    this.type = "menu-button";
    this.tooltipText=this.label;
    this.setAttribute("oncommand", "this.siteGo(event);");
    this.value="http://yahoomail.com";
    this.name="username";
    this.pass="pass";
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/auto-login.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

  317. Navigation Toolbar

    Code Tab

    goToggleToolbar('nav-bar','toggle_navbar');
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-toolbars.html');

    Help Tab

  318. network.proxy Toggle

    Code Tab

    /*CODE*/
    try{
    	var nsIPrefServiceObj = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
    	var prefId = "network.proxy.type";
    	var nsIPrefBranchObj = nsIPrefServiceObj.getBranch(null);
    	if ( nsIPrefBranchObj.getPrefType(prefId) == 64) {
    		result = nsIPrefBranchObj.getIntPref(prefId);
    		if (result == 0){
    			nsIPrefBranchObj.setIntPref(prefId, 1);
    			this.tooltipText = this.tTip[1];
    		}else{
    			nsIPrefBranchObj.setIntPref(prefId, 0);
    			this.tooltipText = this.tTip[0];		}
    	}
    }
    catch(e){
    	alert(e);
    }
    

    Initialization Tab

    /*Initialization Code*/
    try{
    	this.tTip = [this.tooltipText + " = Direct", this.tooltipText + " = Proxy"];
    	var nsIPrefServiceObj = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
    	var prefId = "network.proxy.type";
    	var nsIPrefBranchObj = nsIPrefServiceObj.getBranch(null);
    	if ( nsIPrefBranchObj.getPrefType(prefId) == 64) {
    		result = nsIPrefBranchObj.getIntPref(prefId);
    		this.tooltipText = this.tTip[result];
    	}
    }
    catch(e){
    	alert(e);
    }
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute("author",'SCClockDr');			// Stores Author.		   
    this.setAttribute("version",'20080117.01');             	// Stores Version.	   
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/networkproxy-toggle.html');	// Stores HomePage.	
    this.setAttribute("dependency",'userChrome,FF 2.0.*,CB 2.0.*');	// Stores Dependency.	
    this.setAttribute("status",'Complete');				// Stores Devstatus.	 
    this.setAttribute("public",true);				// Stores Public.		   
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    This button will toggle the network.proxy.type pref
    Between 0 = direct & 1 = proxy
  319. New Button

    Code Tab

    /*Code*/

    Initialization Tab

    this.onLeftClick=function()
    {
    	alert('Left Click');
    }
    this.onMiddleClick=function()
    {
    	alert('Middle Click');
    }
    this.onRightClick=function()
    {
    	this.showPopup(this);
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	switch(evt.button) 
    	{
    		case 0:
    			this.onLeftClick();
    			break;
    		case 1:
    			this.onMiddleClick();
    			break;
    		case 2:
    			this.onRightClick();
    			break;
    	}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = "[L=Left Click | M=Middle Click | R=Context Menu]";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/readymade-leftmiddlerightshift-click.html');

    Help Tab

  320. New Button Updater v3

    Code Tab

    /*CODE*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    let Cb = custombuttons;
    let prefId = Cb.getConst( "CB_BRANCH_ID" ) + "Cb-button" + Cb.getNumber( this.id );
    this.userName = "";
    if ( Cb.isPref( prefId ) ) {
      this.userName = " -" + Cb.getPref( prefId );
    } // End if ( Cb.isPref( prefId ) )
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('...')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    content.document.getElement
    ------------------------------------- -- -------------------------------------*/
    this.oValues = null;
    this.tt = this.tooltipText;
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.cleftclick(evt);
    };
    this.cleftclick = function(evt)
    {
      setTimeout(function(){
        content.document.getElementById( "edit-submit-1" ).click();
      },1000);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    this.alertBox = function()
    {
      Cb.alertBox( this.label + " Source Data warning", "\tOld Button post Source data not present.\nFirst gather the source data from custombuttons.com." );
    }
    this.setValues = function()
    {
      if ( content.document.getElementById( "edit-field-repexttax-value" ).value == "" )  content.document.getElementById( "edit-field-repexttax-value" ).value = content.document.getElementById( "edit-taxonomy-tags-4" ).value;
      if ( content.document.getElementById( "edit-field-depexttax-value" ).value == "" )  content.document.getElementById( "edit-field-depexttax-value" ).value = content.document.getElementById( "edit-taxonomy-tags-3" ).value;
      if ( content.document.getElementById( "edit-field-repsofttax-value" ).value == "" ) content.document.getElementById( "edit-field-repsofttax-value" ).value = content.document.getElementById( "edit-taxonomy-tags-10" ).value;
      if ( content.document.getElementById( "edit-field-depsofttax-value" ).value == "" ) content.document.getElementById( "edit-field-depsofttax-value" ).value = content.document.getElementById( "edit-taxonomy-tags-9" ).value;
    };
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','v3.20090227');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/new-button-updater.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText = this.tt + "\n\nReady for next Post!"
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

      How to use this button:
       1. Open the old button for edit. ( http://custombuttons2.com )
       2. Open create new button post.  ( http://cbbeta.alipaz.net )
       3. Go back to the old post left click the button.
       4. Go to the new post:
          a. Middle click or Ctrl+Left click the button.
          b. Fields should populate.
       5. Add as needed:
          a. Additional buttons.
          b. Add additional images.
          c. Behaviors.
             1.) Get them from the old Post if need be.
       6. Check accuracy.
          a. Fix up where necessary.
       7. Save the new Button.
       8. Save the Old post.
       9. Done
    NOTES:
          First Button field should be populated.
          Additional fields will be manual entry.
          Behavior fields NOT populated.
            If the title field of the source page already has an entry for
          any username " -anyUserName" as the last thing in the title then
          an alert slide will warn of the possipility you might duplicate
          the post in the new forum. Proceed with caution Please!
           Left Click - Copy the old content.
      Ctrl+Left Click - Paste content to the new database.
      Shift+Middle Click - Paste content to the new database.
      Ctrl+Right Click - Clear Gathered Data and reset checked to false.
    
  321. New Tab

    Code Tab

    /* -------------------------------------------------------------
         New Tab button with context
         Opens a new tab with choices on context menu
         Changelog:
         - Added drag and drag support
         - Fixed open tabs for multiple home pages
         - Fixed extra blank tab when selecting Home Page
         - Added "From File" menu item
       ------------------------------------------------------------- */
    BrowserOpenTab();
    

    Initialization Tab

    var test = document.getElementById("cbContext-newTab");
    if(test) test.parentNode.removeChild(test);
    this.newTab = function(url) {
      if(url == "home") {
        var urls = gHomeButton.getHomePage().split("|");
        gBrowser.selectedTab = gBrowser.addTab(urls[0]);
        for(var i = 1; i < urls.length; ++i) {
          try {
            gBrowser.addTab(urls[i]);
          } catch (ex) {
          }
        }
      } else if(url == "file") {
        try {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, gNavigatorBundle.getString("openFile"),
                           nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterAll |
                           nsIFilePicker.filterText |
                           nsIFilePicker.filterImages |
                           nsIFilePicker.filterXML |
                           nsIFilePicker.filterHTML);
          if(fp.show() == nsIFilePicker.returnOK)
            gBrowser.selectedTab = gBrowser.addTab(fp.fileURL.spec);
        } catch (ex) {
        }
      } else gBrowser.selectedTab = gBrowser.addTab(url);
    }
    this.popupShowing = function(node) {
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      node.lastChild.previousSibling.previousSibling
        .setAttribute("disabled", !pasteURL ? true : false);
    }
    var mPopup = document.createElement("popup");
    mPopup.id = "cbContext-newTab";
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    function addMenuitem(label, url, obj) {
      var mItem = document.createElement("menuitem");
      mItem.setAttribute("label", label);
      mItem.func = obj.newTab.bind(obj);
      mItem.setAttribute("oncommand", "this.func(" + url + ")");
      mPopup.appendChild(mItem);
    }
    addMenuitem("Blank Page", null, this);
    addMenuitem("Current Page", "content.location", this);
    addMenuitem("Home Page", "'home'", this);
    mPopup.appendChild(document.createElement("menuseparator"));
    addMenuitem("From File", "'file'", this);
    addMenuitem("From Clipboard", "readFromClipboard()", this);
    mPopup.appendChild(document.createElement("menuseparator"));
    var cbPopup = document.getElementById("custombuttons-contextpopup").cloneNode(true);
    var cbItems = cbPopup.childNodes.length;
    var subPopup = document.createElement("menupopup");
    for(var i = 0; i < cbItems; i++) {
      subPopup.appendChild(cbPopup.firstChild);
    }
    var subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.appendChild(subPopup);
    mPopup.appendChild(subMenu);
    document.getElementById("mainPopupSet").appendChild(mPopup);
    this.setAttribute("context", mPopup.id);
    this.setAttribute("ondragover",
      "nsDragAndDrop.dragOver(event, newTabButtonObserver)");
    this.setAttribute("ondragdrop",
      "nsDragAndDrop.drop(event, newTabButtonObserver)");
    this.setAttribute("ondragexit",
      "nsDragAndDrop.dragExit(event, newTabButtonObserver)");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/new-tab-button-group.html');

    Help Tab

  322. New Tab

    Code Tab

    /* -------------------------------------------------------------
         New Tab button menu
         Opens a new tab with choices
         Changelog:
         - Added drag and drag support
         - Fixed open tabs for multiple home pages
         - Fixed extra blank tab when selecting Home Page
         - Added "From File" menu item
       ------------------------------------------------------------- */
    

    Initialization Tab

    this.newTab = function(url) {
      if(url == "home") {
        var urls = gHomeButton.getHomePage().split("|");
        gBrowser.selectedTab = gBrowser.addTab(urls[0]);
        for(var i = 1; i < urls.length; ++i) {
          try {
            gBrowser.addTab(urls[i]);
          } catch (ex) {
          }
        }
      } else if(url == "file") {
        try {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, gNavigatorBundle.getString("openFile"),
                           nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterAll |
                           nsIFilePicker.filterText |
                           nsIFilePicker.filterImages |
                           nsIFilePicker.filterXML |
                           nsIFilePicker.filterHTML);
          if(fp.show() == nsIFilePicker.returnOK)
            gBrowser.selectedTab = gBrowser.addTab(fp.fileURL.spec);
        } catch (ex) {
        }
      } else gBrowser.selectedTab = gBrowser.addTab(url);
    }
    this.popupShowing = function(node) {
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      node.lastChild.setAttribute("disabled", !pasteURL ? true : false);
    }
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    function addMenuitem(label, url, obj) {
      var mItem = document.createElement("menuitem");
      mItem.setAttribute("label", label);
      mItem.func = obj.newTab.bind(obj);
      mItem.setAttribute("oncommand", "this.func(" + url + ")");
      mPopup.appendChild(mItem);
    }
    addMenuitem("Blank Page", null, this);
    addMenuitem("Current Page", "content.location", this);
    addMenuitem("Home Page", "'home'", this);
    mPopup.appendChild(document.createElement("menuseparator"));
    addMenuitem("From File", "'file'", this);
    addMenuitem("From Clipboard", "readFromClipboard()", this);
    this.appendChild(mPopup);
    this.type = "menu";
    this.setAttribute("ondragover",
      "nsDragAndDrop.dragOver(event, newTabButtonObserver)");
    this.setAttribute("ondragdrop",
      "nsDragAndDrop.drop(event, newTabButtonObserver)");
    this.setAttribute("ondragexit",
      "nsDragAndDrop.dragExit(event, newTabButtonObserver)");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/new-tab-button-group.html');

    Help Tab

  323. New Tab² (context menu)

    Code Tab

    /* 
        This is an adaptation of LouCypher's New Tab with context menu button: http://custombuttons2.com/forum/post2851.html#p2851
        Left clicking opens a standard new tab.
        Right clicking opens the context menu from which you can open a new tab with one of these options:
            - Blank page
            - Current URL sub-menu (the number of levels will, of course, vary depending on the URL):
                - Current URL
                - Up one level (if applicable)
                - Up two levels (if applicable)
                  (...and so on until...)
                - Curent sub-domain (if applicable)
                - Current domain (if different from current URL)
            - Duplicate tab sub-menu:
                - Duplicate in this window
                - Duplicate in new window
            - Home page(s) sub-menu
                - Open all home page tabs (if home page consists of more than one tab)
                - Individual items for each home page tab
                - ...
            - From a file
            - URL from clipboard
        Rawny ^^
    */
    BrowserOpenTab();
    

    Initialization Tab

    // ***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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALGj63gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABVSURBVChTrY9LDoAwCAXrpwotD+5/2kprotS1s5xMXiAxpMNER+sksRtBGeYRMONJUOG651D4SD7XIEzBsgShgOAt1AE+QqFz4dG/Yvyn1kfrFvBLL1FCMUlGtzzyAAAAAElFTkSuQmCC";
    var imgCurr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAU1JS7v8AmZiXqKirxMLF2djX5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMH56VQAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABJSURBVChTrcxBDoAgDETRGcHC/S9cpykaLVvfpsnPALzAP4FBX+WF8wh0TukswYgcaBIDTV5hBMO0L1hLfV2FfHx7wlgFZ7GFCwKcXMPAsFH9AAAAAElFTkSuQmCC";
    var imgDupe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWF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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3lBB2gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACOSURBVChTZYxREoIwDERjLS1QMVRTbAzl/reEYHVk9P3t252F9QfYM084TFybKh5Dfz8IxhBv8cqMKnXB1IW2DXEc/VSF8WdqTB9iqAt3Mi4zmS4GUsEp55xoxYvvPBKD2EWhNTWIyFaAZBfiiEWEE4FdSilLIeteWJg1KzO/gVk/j4DkOvkAz7yffvkT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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAi7bbmQAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACjSURBVChTZcxtF0JAEIbhZUrlpVVhC8VmRWHS/v//pt3TSTnuj9eZZ8itFGK79TzHsW3LstaSlPe6KgWl1HVXqqUkVd/XdaVQHBRTJfVr0k6S51T2M5nf/Anmjd7/pMmvF02jYHYsikjRV5CzsyrCUbjJkjSNQ9ByQrVuObCUZfyhBaBFRG7GSdB9PneGAQBBnIQL9H1/I8nQQhCymAXQDTr5Bg7eK1eegcbvAAAAAElFTkSuQmCC";
    var imgHome = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFAAAAXjEOU1JSozARpjAtnFIxqUkPoVYNnVhQnXBSnHVw3RcU3TUz4wQG5jEL41EP6FEs620L4XMw3k5N5W9P5HFun4xxqIdQ7JIP5Y8s3ZNP3pFwi4qKmZiXpKeTqKirt7i4sNXP3pOP3piq3bGQ1Lax4s+xxMLF2djX5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2f4hgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNTDus58AAACpSURBVChTdc1rF4IgDAZgyi4mBTFvpaKmYrD///9oUKc+9X4YO8+2A/MxY5GO747F2gPw3fCDDhrFeaI/G2MpAQg4z+LJmAuplLgIShqgkxQxTzyIJgClZO4Q7VnQxDO6v06mX9fFlmGXARQWj5ttdjA45xIYlIi4VPWpXRGfKbBBE6A1xqJzTg/MR9gnSU1gwy8B3F7Kyln7+AIo2f4FrynN7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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxumegAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACbSURBVChThY1LEoMgDEABtbUooBAVWi2xcv8rWuLooqu+mZDwJh+2ZwKqWmGgcmc5ZqmVVFqqUyyyl53t8jufHUtj4yc6vVwju5IuOfm+dgRtrIvOmqOFlrb9ozVNY+50JwuAorzV81QAQBYBgvdj2U7j03uAwJCnDAyAOa0cWfUigWKglLxgPG0EiEoQnK3Hf1vDASKd/eG/+AIc9XB759IalAAAAABJRU5ErkJggg==";
    var imgFile = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAFTSvERfKDTPKG1OtFUjLFVfSEFHzJWnNLXfRKHL0VFesUmuwZniwX1LKUnXNUXbwbY60W4nRUYjxXZnxaZjQZ6fza7f1b8r4kZSvt7i4kZbKnKnLlbXtr7nNscXRocnyptf2rez6zbzJ0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWs+nOAAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAC1SURBVChTXY7REoIgEEUXTaOsUEAsBQQC/v8PaXHGl/Zpz7k7sxfK38DJ343bup9CbzFOh+DzPLOy6ZST1lWI4L3iMeeU4nOtFzkYnSunuD3XFYXZkXFmJigbquDGGKUYlVL2BIUQzqGRStyvzQNYuKWU/SIR26aZgC8ie1dTxIZo4NKFt8K8a9EMBajwwTujxrF/deRRoJP1JZaIu7XDp0Drj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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyCQWGwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACaSURBVChTTc/rEoIgEIZhOpcmWpQQBmq1y/1foX2LTtM7/IBnGA5qmibvPAYmkupGu+KU2NnHK0NtishoKEzdZUilQ9YWrV6gbZqm9L5/jzFgxyndUUs4hjl6AYNuABScU9sMJgMPUeCqtb7MQIMA1pUWYKKPwBlVC9A/4BYCbH475L38VOuDdCR5Rga/20v4X6ag5k93Ycl9ATZ1NHYSQjjrAAAAAElFTkSuQmCC";
    var imgPasteDis = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb3BxlnqMi4qKmZiXqKirt7i4sNXPxMLF2djX5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAn2X1wgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAB8SURBVChTXY/REsMgCARJgIvg/39vekfaaafri6wHqt33jRTcCGMVtXdHJEYEHF3VyxEyFptnXBHXRzwjEouLCd9L1O7uQkpA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7S6U7/IztG2vcT+2Nrg8+rn7fzp3+b43s3V6ragqdWxmKCqkXh/LQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NvigdHS2fDl3uf+3tDa/s+8xuzRu8RsAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjc4wvX193A5uLo/d/U2v7Wyc/Z1sbMEAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OPp2eDc4fLVy9H75dnfmwAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** VARS ***** //
    var button = this;
    var URLs = [];
    var homeURLs = [];
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
    // ***** FUNCTIONS ***** //
    function getURLs(loc){
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            URLs = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return URLs;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLs[URLs.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLs[URLs.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    this.newTab = function(url) {
      if(url == "home") {
        var urls = gHomeButton.getHomePage().split("|");
        gBrowser.selectedTab = gBrowser.addTab(urls[0]);
        for(var i = 1; i < urls.length; ++i) {
          try {
            gBrowser.addTab(urls[i]);
          } catch (ex) {
          }
        }
      } else if(url == "file") {
        try {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, gNavigatorBundle.getString("openFile"),
                           nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterAll |
                           nsIFilePicker.filterText |
                           nsIFilePicker.filterImages |
                           nsIFilePicker.filterXML |
                           nsIFilePicker.filterHTML);
          if(fp.show() == nsIFilePicker.returnOK)
            gBrowser.selectedTab = gBrowser.addTab(fp.fileURL.spec);
        } catch (ex) {
        }
      } else if(url == "DupeTab") {
        gBrowser.selectedTab = gBrowser.duplicateTab(gBrowser.selectedTab);
      } else if(url == "DupeWin") {
            var SelectedTab = gBrowser.selectedTab;
    	window.open();
            var NewWin = wm.getMostRecentWindow ("navigator:browser");
            var cBrowser = NewWin.gBrowser;
            var DupeTab = cBrowser.duplicateTab(SelectedTab);
            cBrowser.selectedTab = DupeTab;
            cBrowser.mTabContainer.advanceSelectedTab(-1, true);
            cBrowser.removeCurrentTab();
      } else gBrowser.selectedTab = gBrowser.addTab(url);
    }
    this.popupShowing = function(node) {
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {}
      node.lastChild.previousSibling.previousSibling.setAttribute("disabled", !pasteURL ? true : false);
      node.lastChild.previousSibling.previousSibling.setAttribute("image", !pasteURL ? imgPasteDis : imgPaste);
    }
    function addMenuitem(label, url, img, obj, menu) {
      var mItem = document.createElement("menuitem");
      mItem.setAttribute("label", label);
      mItem.setAttribute("image", img);
      mItem.func = obj.newTab.bind(obj);
      mItem.setAttribute("oncommand", "this.func(" + url + ")");
      menu.appendChild(mItem);
    }
    PopulateSub = function() {
        while (subCurrPopup.hasChildNodes())
    	   subCurrPopup.removeChild(subCurrPopup.firstChild);
        getURLs(content.location);
        l = URLs.length;
        addMenuitem(content.location, '"'+content.location+'"', "http://www.google.com/s2/favicons?domain="+(content.location.href.split(/\/+/g)[1]), button, subCurrPopup);
        if (l > 0) {
          for (var i = 0; i < l; i++) {
            if (URLs[i] == "about:blank")
                addMenuitem(URLs[i], '"'+URLs[i]+'"', imgBlank, button, subCurrPopup);
            else
                addMenuitem(URLs[i], '"'+URLs[i]+'"', "http://www.google.com/s2/favicons?domain="+(URLs[i].split(/\/+/g)[1]), button, subCurrPopup);
          }
        }
    }
    PopulateHomeSub = function() {
        var mItems, mItem;
        homeURLS = [];
        while (subHomePopup.hasChildNodes())
    	   subHomePopup.removeChild(subHomePopup.firstChild);
        homeURLs = gHomeButton.getHomePage().split("|");
        var hL = homeURLs.length;
        if (hL > 1) {
          addMenuitem("Open all in new tabs", "'home'", imgAll, button, subHomePopup);
          subHomePopup.appendChild(document.createElement("menuseparator"));
        }
        for(var j = 0; j < hL; j++) {
          if (homeURLs[j] == "about:blank")
            addMenuitem(homeURLs[j], '"'+homeURLs[j]+'"', imgBlank, button, subHomePopup);
          else
            addMenuitem(homeURLs[j], '"'+homeURLs[j]+'"', "http://www.google.com/s2/favicons?domain="+(homeURLs[j].split(/\/+/g)[1]), button, subHomePopup);
        }
    }
    // ***** INITIALISATION ***** //
    var test = document.getElementById("cbContext-newTabTwo");
    if(test) test.parentNode.removeChild(test);
    var mPopup = document.createElement("popup");
    mPopup.id = "cbContext-newTabTwo";
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    addMenuitem("Blank Page", null, imgBlank, this, mPopup);
    var subCurrPopup = document.createElement("menupopup");
    subCurrPopup.popupShowing = PopulateSub();
    subCurrPopup.setAttribute("onpopupshowing", "PopulateSub();");
    var subCurrMenu = document.createElement("menu");
    subCurrMenu.setAttribute("label", "Current URL");
    subCurrMenu.setAttribute("image", imgCurr);
    subCurrMenu.appendChild(subCurrPopup);
    mPopup.appendChild(subCurrMenu);
    var subDupePopup = document.createElement("menupopup");
    addMenuitem("...in this window", "'DupeTab'", imgDupeTab, this, subDupePopup);
    addMenuitem("...in new window", "'DupeWin'", imgDupeWin, this, subDupePopup);
    var subDupeMenu = document.createElement("menu");
    subDupeMenu.setAttribute("label", "Duplicate tab");
    subDupeMenu.setAttribute("image", imgDupe);
    subDupeMenu.appendChild(subDupePopup);
    mPopup.appendChild(subDupeMenu);
    var subHomePopup = document.createElement("menupopup");
    subHomePopup.id = "subHomepopup";
    subHomePopup.popupShowing = PopulateHomeSub();
    subHomePopup.setAttribute("onpopupshowing", "PopulateHomeSub();");
    var subHomeMenu = document.createElement("menu");
    subHomeMenu.setAttribute("label", "Home page(s)");
    subHomeMenu.setAttribute("image", imgHome);
    subHomeMenu.appendChild(subHomePopup);
    mPopup.appendChild(subHomeMenu);
    mPopup.appendChild(document.createElement("menuseparator"));
    addMenuitem("From File", "'file'", imgFile, this, mPopup);
    addMenuitem("From Clipboard", "readFromClipboard()", imgPaste, this, mPopup);
    mPopup.appendChild(document.createElement("menuseparator"));
    var cbPopup = document.getElementById("custombuttons-contextpopup").cloneNode(true);
    var cbItems = cbPopup.childNodes.length;
    var subPopup = document.createElement("menupopup");
    for(var i = 0; i < cbItems; i++) {
      subPopup.appendChild(cbPopup.firstChild);
    }
    var subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.setAttribute("image", imgCB);
    subMenu.appendChild(subPopup);
    mPopup.appendChild(subMenu);
    document.getElementById("mainPopupSet").appendChild(mPopup);
    this.setAttribute("context", mPopup.id);
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, newTabButtonObserver)");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, newTabButtonObserver)");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, newTabButtonObserver)");
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, LouCypher');
    this.setAttribute('version','6');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/new-tab2.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left clicking opens a new tab.
    Right clicking opens the context menu from which you can open a new tab with one of these options:
        - Blank page
        - Current URL sub-menu (the number of levels will, of course, vary depending on the URL):
            - Current URL
            - Up one level (if applicable)
            - Up two levels (if applicable)
              (...and so on until...)
            - Curent sub-domain (if applicable)
            - Current domain (if different from current URL)
        - Duplicate tab sub-menu:
            - Duplicate in this window
            - Duplicate in new window
        - Home page(s) sub-menu
            - Open all home page tabs (if home page consists of more than one tab)
            - Individual items for each home page tab
            - ...
        - From a file
        - URL from clipboard
  324. New Tab² (drop-marker menu button)

    Code Tab

    /* 
        This is an adaptation of LouCypher's New Tab with menu button: http://custombuttons2.com/forum/post2851.html#p2851
        Left clicking the main button opens a standard new tab.
        Left clicking the drop-marker opens the dropdown menu from which you can open a new tab with one of these options:
            - Blank page
            - Current URL sub-menu (the number of levels will, of course, vary depending on the URL):
                - Current URL
                - Up one level (if applicable)
                - Up two levels (if applicable)
                  (...and so on until...)
                - Curent sub-domain (if applicable)
                - Current domain (if different from current URL)
            - Duplicate tab sub-menu:
                - Duplicate in this window
                - Duplicate in new window
            - Home page(s) sub-menu
                - Open all home page tabs (if home page consists of more than one tab)
                - Individual items for each home page tab
                - ...
            - From a file
            - URL from clipboard
        Rawny ^^
    */
    BrowserOpenTab();
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var imgBlank = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb3Bxa3KPi4qKkZSvqKirt7i4nKnLr7nNscXRzbzJxMLF2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALGj63gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABVSURBVChTrY9LDoAwCAXrpwotD+5/2kprotS1s5xMXiAxpMNER+sksRtBGeYRMONJUOG651D4SD7XIEzBsgShgOAt1AE+QqFz4dG/Yvyn1kfrFvBLL1FCMUlGtzzyAAAAAElFTkSuQmCC";
    var imgCurr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAU1JS7v8AmZiXqKirxMLF2djX5ejw+Pv6AAAAAAAA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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABJSURBVChTrcxBDoAgDETRGcHC/S9cpykaLVvfpsnPALzAP4FBX+WF8wh0TukswYgcaBIDTV5hBMO0L1hLfV2FfHx7wlgFZ7GFCwKcXMPAsFH9AAAAAElFTkSuQmCC";
    var imgDupe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG6SURBVDjLxVNNKERRFP7ue0/JiIxXyE8aq/HTSP4iG2JpYSEL0qzYWFgrG8zCVopSs5CVnZVIWbFAYuG3NGaKmCz8z9z37rvuvTN+htSUhVPfPefczvd1zrldwjnHX0zDH+3/BQx5BIPBDuGmBJrS5F0IjPr9/hUjeTHj83m9BQWmSghRZzL+9ImYIBq98+zsHMyK5EPAdLtzEQ7fwLJYYjZN+yBJvOeGYaC4OF9xvu2AQNd1VSiLZCz9O5YvxrBwNCxiWaP/XKIk6rqRQv4qEmcUJaYXge0+0YmWusTEjFJAA+eGanXxdBTgNqgjYDMU5VXAW9iEx9gzBpYa0JszkRAQL8DLy0uRleWCy+VSo0gB+5iis2oQjDtgDoMDjqv7CGpKWvFEXzEfGclEEFx1EApFFL5ajFBFvrw7hyW6sB0LFrPwEH9EbWkbnqwXTIeGQH77C/0LlbzbNySITEGKXd+H4c4uxH5kC+snqyfURt2vAj1zHhajVOyAImZTVJhVWrOnC7vhLWycrR0KcuNVgMdJur+xelKL1pe1m5tnG3vUQYsgU7X8dAU84yTKHN18dVjGbUA8T9LeAB6et/fbYA/BAAAAAElFTkSuQmCC";
    var imgDupeTab = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUE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AAAAAAAAAAAAAAAAA3lBB2gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACOSURBVChTZYxREoIwDERjLS1QMVRTbAzl/reEYHVk9P3t252F9QfYM084TFybKh5Dfz8IxhBv8cqMKnXB1IW2DXEc/VSF8WdqTB9iqAt3Mi4zmS4GUsEp55xoxYvvPBKD2EWhNTWIyFaAZBfiiEWEE4FdSilLIeteWJg1KzO/gVk/j4DkOvkAz7yffvkTG850R6N4cUoNAAAAAElFTkSuQmCC";
    var imgDupeWin = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAMAAADH72RtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAE1QND3MOMXUxLXJPFTSvDTPKCTD6G1OtIkiVFUjLFVfSEFHzJWnNLXfRKHL0VFesUmuwZniwUXbwDIgJEZgMF5QuD7EIMK4vOI9MC8YIB9cGC/IJMPUvV7A1XY9TWK9ObpFvYM1Rbu5xUYjxXZnxaZjQZ6fza7f1b8r4p6t0mbeTpKeTqKirt7i4lbXtocny+Pv6////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAi7bbmQAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACjSURBVChTZcxtF0JAEIbhZUrlpVVhC8VmRWHS/v//pt3TSTnuj9eZZ8itFGK79TzHsW3LstaSlPe6KgWl1HVXqqUkVd/XdaVQHBRTJfVr0k6S51T2M5nf/Anmjd7/pMmvF02jYHYsikjRV5CzsyrCUbjJkjSNQ9ByQrVuObCUZfyhBaBFRG7GSdB9PneGAQBBnIQL9H1/I8nQQhCymAXQDTr5Bg7eK1eegcbvAAAAAElFTkSuQmCC";
    var imgHome = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFAAAAXj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B0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNTDus58AAACpSURBVChTdc1rF4IgDAZgyi4mBTFvpaKmYrD///9oUKc+9X4YO8+2A/MxY5GO747F2gPw3fCDDhrFeaI/G2MpAQg4z+LJmAuplLgIShqgkxQxTzyIJgClZO4Q7VnQxDO6v06mX9fFlmGXARQWj5ttdjA45xIYlIi4VPWpXRGfKbBBE6A1xqJzTg/MR9gnSU1gwy8B3F7Kyln7+AIo2f4FrynN7V4N9Hr/AmKxSjXx2ywhAAAAAElFTkSuQmCC";
    var imgAll = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFAAAAU1JSb3Bxpm4TnXBSlnqMn4xxrq9P7JIP5Y8s9K8N77Aw3ZNP369v57BR+M8M89Aw+fQJ+vNP+fFxi4qKmZiXkZSvpKeTqKirt7i4nKnLsNXP3bGQ1Lax4s+x+vSRxMLF2djX6e/U5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxumegAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACbSURBVChThY1LEoMgDEABtbUooBAVWi2xcv8rWuLooqu+mZDwJh+2ZwKqWmGgcmc5ZqmVVFqqUyyyl53t8jufHUtj4yc6vVwju5IuOfm+dgRtrIvOmqOFlrb9ozVNY+50JwuAorzV81QAQBYBgvdj2U7j03uAwJCnDAyAOa0cWfUigWKglLxgPG0EiEoQnK3Hf1vDASKd/eG/+AIc9XB759IalAAAAABJRU5ErkJggg==";
    var imgFile = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAFT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Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAC1SURBVChTXY7REoIgEEUXTaOsUEAsBQQC/v8PaXHGl/Zpz7k7sxfK38DJ343bup9CbzFOh+DzPLOy6ZST1lWI4L3iMeeU4nOtFzkYnSunuD3XFYXZkXFmJigbquDGGKUYlVL2BIUQzqGRStyvzQNYuKWU/SIR26aZgC8ie1dTxIZo4NKFt8K8a9EMBajwwTujxrF/deRRoJP1JZaIu7XDp0DrjhIorNVkLUAoY5TS/tIRQoZSfifSRO+0Ao6dAAAAAElFTkSuQmCC";
    var imgPaste = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb4mSnFIxoVYNoG0znXBSnHVw620L4XMwrY4zn4xxp6t07JIP5Y8s77Aw3ZNP369v57BR89Aw8NBQ8tFw+vNP+fFxmZiXkZSvpKeTqKirt7i4kZbKnKnLr7nNrsuzscXR3bGQ1Lax4s+x2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyCQWGwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACaSURBVChTTc/rEoIgEIZhOpcmWpQQBmq1y/1foX2LTtM7/IBnGA5qmibvPAYmkupGu+KU2NnHK0NtishoKEzdZUilQ9YWrV6gbZqm9L5/jzFgxyndUUs4hjl6AYNuABScU9sMJgMPUeCqtb7MQIMA1pUWYKKPwBlVC9A/4BYCbH475L38VOuDdCR5Rga/20v4X6ag5k93Ycl9ATZ1NHYSQjjrAAAAAElFTkSuQmCC";
    var imgPasteDis = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAn2X1wgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAB8SURBVChTXY/REsMgCARJgIvg/39vekfaaafri6wHqt33jRTcCGMVtXdHJEYEHF3VyxEyFptnXBHXRzwjEouLCd9L1O7uQkpAcC5h2M6v6F6QYH+kEuxZaQdvISOq6leoHuGECd3yL2iYOMnhkxgBdfhbdKc9n0bycfODF3FyIvGocUrbAAAAAElFTkSuQmCC";
    var imgCB = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnsK8UpK2sy6Cqqr6msLEaAAAAAAAAAAAAAAAAwbS3DtDGxs6jmZnajYeEvI+LhxcAAAAAAAAAAAAAAAAAAAAAqLGxBa+5ucymsbPwtsDCxcvQ1aDV1twUuauxFK+fpayklZn3jH+A/YuBf9OOh4QaAAAAAAAAAAAAAAAAAAAAAAAAAADX4OK7u8bI+rC5vPvJzdLx3NnesdbM0rO/r7XXlIGH/Yh3evuvo6Ljt6yqGAAAAAAAAAAAAAAAAAAAAAAAAAAA6/DysLTAxP+4wMX7y87T8e3r8Ozt5urt1MbM9rWhqPeeiI7p1MHDh9bGxwcAAAAAAAAAAAAAAAAAAAAAz9reBdvk6L2qtrz/tr3E/NHU2fno5+v37OXp99zO1Pi/q7L2pIuT6su2vGHIsLYCAAAAAAAAAAAAAAAAjJmfAaGvtCGptbuzmaWt+7S7w/vX2t/86Ofr++7o7Pzg0tj8vqiw+5B0ff6pj5Xamn+FKpBzegIAAAAAkpufAoqVmyWJlpyokp+m146aof+3vsX71Njd/eno7P3v5+z93s/W/begqP17XGb9clVd9H1iaL19ZmsyemhsApCZnSSIkpbHg4+VyYuXnumLmJ//qa63/tTX3f7z8vb+9O3x/eTV3P22nab9dlZg/l1BSPtgSE3ocl9ivoJwcyaWn6O9fIWKz4aRlqaTnqTEmaat/7K4wf/W2eD+8e/0/fDp7vrj09r4uqGr8oFkbfxpT1XmUTtAw2VSVsCSgYTDAAAAAAAAAAAAAAAAq7S6U7/IztG2vcT+2Nrg8+rn7fzp3+b43s3V6ragqdWxmKCqkXh/LQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NvigdHS2fDl3uf+3tDa/s+8xuzRu8RsAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjc4wvX193A5uLo/d/U2v7Wyc/Z1sbMEAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OPp2eDc4fLVy9H75dnfmwAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** VARS ***** //
    var button = this;
    var URLs = [];
    var homeURLs = [];
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
    // ***** FUNCTIONS ***** //
    function getURLs(loc){
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            URLs = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return URLs;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLs[URLs.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLs[URLs.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    this.newTab = function(url) {
      if(url == "home") {
        var urls = gHomeButton.getHomePage().split("|");
        gBrowser.selectedTab = gBrowser.addTab(urls[0]);
        for(var i = 1; i < urls.length; ++i) {
          try {
            gBrowser.addTab(urls[i]);
          } catch (ex) {
          }
        }
      } else if(url == "file") {
        try {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, gNavigatorBundle.getString("openFile"),
                           nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterAll |
                           nsIFilePicker.filterText |
                           nsIFilePicker.filterImages |
                           nsIFilePicker.filterXML |
                           nsIFilePicker.filterHTML);
          if(fp.show() == nsIFilePicker.returnOK)
            gBrowser.selectedTab = gBrowser.addTab(fp.fileURL.spec);
        } catch (ex) {
        }
      } else if(url == "DupeTab") {
        gBrowser.selectedTab = gBrowser.duplicateTab(gBrowser.selectedTab);
      } else if(url == "DupeWin") {
            var SelectedTab = gBrowser.selectedTab;
    	window.open();
            var NewWin = wm.getMostRecentWindow ("navigator:browser");
            var cBrowser = NewWin.gBrowser;
            var DupeTab = cBrowser.duplicateTab(SelectedTab);
            cBrowser.selectedTab = DupeTab;
            cBrowser.mTabContainer.advanceSelectedTab(-1, true);
            cBrowser.removeCurrentTab();
      } else gBrowser.selectedTab = gBrowser.addTab(url);
    }
    this.popupShowing = function(node) {
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {}
      mPopup.lastChild.setAttribute("disabled", !pasteURL ? true : false);
      mPopup.lastChild.setAttribute("image", !pasteURL ? imgPasteDis : imgPaste);
    }
    function addMenuitem(label, url, img, obj, menu) {
      var mItem = document.createElement("menuitem");
      mItem.setAttribute("label", label);
      mItem.setAttribute("image", img);
      mItem.func = obj.newTab.bind(obj);
      mItem.setAttribute("oncommand", "this.func(" + url + ")");
      menu.appendChild(mItem);
    }
    PopulateSub = function() {
        while (subCurrPopup.hasChildNodes())
    	   subCurrPopup.removeChild(subCurrPopup.firstChild);
        getURLs(content.location);
        l = URLs.length;
        addMenuitem(content.location, '"'+content.location+'"', "http://www.google.com/s2/favicons?domain="+(content.location.href.split(/\/+/g)[1]), button, subCurrPopup);
        if (l > 0) {
          for (var i = 0; i < l; i++) {
            if (URLs[i] == "about:blank")
                addMenuitem(URLs[i], '"'+URLs[i]+'"', imgBlank, button, subCurrPopup);
            else
                addMenuitem(URLs[i], '"'+URLs[i]+'"', "http://www.google.com/s2/favicons?domain="+(URLs[i].split(/\/+/g)[1]), button, subCurrPopup);
          }
        }
    }
    PopulateHomeSub = function() {
        var mItems, mItem;
        homeURLS = [];
        while (subHomePopup.hasChildNodes())
    	   subHomePopup.removeChild(subHomePopup.firstChild);
        homeURLs = gHomeButton.getHomePage().split("|");
        var hL = homeURLs.length;
        if (hL > 1) {
          addMenuitem("Open all in new tabs", "'home'", imgAll, button, subHomePopup);
          subHomePopup.appendChild(document.createElement("menuseparator"));
        }
        for(var j = 0; j < hL; j++) {
          if (homeURLs[j] == "about:blank")
            addMenuitem(homeURLs[j], '"'+homeURLs[j]+'"', imgBlank, button, subHomePopup);
          else
            addMenuitem(homeURLs[j], '"'+homeURLs[j]+'"', "http://www.google.com/s2/favicons?domain="+(homeURLs[j].split(/\/+/g)[1]), button, subHomePopup);
        }
    }
    // ***** INITIALISATION ***** //
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    addMenuitem("Blank Page", null, imgBlank, this, mPopup);
    var subCurrPopup = document.createElement("menupopup");
    subCurrPopup.popupShowing = PopulateSub();
    subCurrPopup.setAttribute("onpopupshowing", "PopulateSub();");
    var subCurrMenu = document.createElement("menu");
    subCurrMenu.setAttribute("label", "Current URL");
    subCurrMenu.setAttribute("image", imgCurr);
    subCurrMenu.appendChild(subCurrPopup);
    mPopup.appendChild(subCurrMenu);
    var subDupePopup = document.createElement("menupopup");
    addMenuitem("...in this window", "'DupeTab'", imgDupeTab, this, subDupePopup);
    addMenuitem("...in new window", "'DupeWin'", imgDupeWin, this, subDupePopup);
    var subDupeMenu = document.createElement("menu");
    subDupeMenu.setAttribute("label", "Duplicate tab");
    subDupeMenu.setAttribute("image", imgDupe);
    subDupeMenu.appendChild(subDupePopup);
    mPopup.appendChild(subDupeMenu);
    var subHomePopup = document.createElement("menupopup");
    subHomePopup.id = "subHomepopup";
    subHomePopup.popupShowing = PopulateHomeSub();
    subHomePopup.setAttribute("onpopupshowing", "PopulateHomeSub();");
    var subHomeMenu = document.createElement("menu");
    subHomeMenu.setAttribute("label", "Home page(s)");
    subHomeMenu.setAttribute("image", imgHome);
    subHomeMenu.appendChild(subHomePopup);
    mPopup.appendChild(subHomeMenu);
    var menusep = mPopup.appendChild(document.createElement("menuseparator"));
    addMenuitem("From File", "'file'", imgFile, this, mPopup);
    addMenuitem("From Clipboard", "readFromClipboard()", imgPaste, this, mPopup);
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, newTabButtonObserver)");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, newTabButtonObserver)");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, newTabButtonObserver)");
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, LouCypher');
    this.setAttribute('version','6');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/new-tab2.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left clicking the main button opens a standard new tab.
    Left clicking the drop-marker opens the dropdown menu from which you can open a new tab with one of these options:
        - Blank page
        - Current URL sub-menu (the number of levels will, of course, vary depending on the URL):
            - Current URL
            - Up one level (if applicable)
            - Up two levels (if applicable)
              (...and so on until...)
            - Curent sub-domain (if applicable)
            - Current domain (if different from current URL)
        - Duplicate tab sub-menu:
            - Duplicate in this window
            - Duplicate in new window
        - Home page(s) sub-menu
            - Open all home page tabs (if home page consists of more than one tab)
            - Individual items for each home page tab
            - ...
        - From a file
        - URL from clipboard
  325. New Tab² (drop-marker menu button)

    Code Tab

    /* 
        This is an adaptation of LouCypher's New Tab with menu button: http://custombuttons2.com/forum/post2851.html#p2851
        Left clicking the main button opens a standard new tab.
        Left clicking the drop-marker opens the dropdown menu from which you can open a new tab with one of these options:
            - Blank page
            - Current URL sub-menu (the number of levels will, of course, vary depending on the URL):
                - Current URL
                - Up one level (if applicable)
                - Up two levels (if applicable)
                  (...and so on until...)
                - Curent sub-domain (if applicable)
                - Current domain (if different from current URL)
            - Duplicate tab sub-menu:
                - Duplicate in this window
                - Duplicate in new window
            - Home page(s) sub-menu
                - Open all home page tabs (if home page consists of more than one tab)
                - Individual items for each home page tab
                - ...
            - From a file
            - URL from clipboard
        Rawny ^^
    */
    BrowserOpenTab();
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var imgBlank = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb3Bxa3KPi4qKkZSvqKirt7i4nKnLr7nNscXRzbzJxMLF2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALGj63gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABVSURBVChTrY9LDoAwCAXrpwotD+5/2kprotS1s5xMXiAxpMNER+sksRtBGeYRMONJUOG651D4SD7XIEzBsgShgOAt1AE+QqFz4dG/Yvyn1kfrFvBLL1FCMUlGtzzyAAAAAElFTkSuQmCC";
    var imgCurr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAU1JS7v8AmZ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T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABJSURBVChTrcxBDoAgDETRGcHC/S9cpykaLVvfpsnPALzAP4FBX+WF8wh0TukswYgcaBIDTV5hBMO0L1hLfV2FfHx7wlgFZ7GFCwKcXMPAsFH9AAAAAElFTkSuQmCC";
    var imgDupe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG6SURBVDjLxVNNKERRFP7ue0/JiIxXyE8aq/HTSP4iG2JpYSEL0qzYWFgrG8zCVopSs5CVnZVIWbFAYuG3NGaKmCz8z9z37rvuvTN+htSUhVPfPefczvd1zrldwjnHX0zDH+3/BQx5BIPBDuGmBJrS5F0IjPr9/hUjeTHj83m9BQWmSghRZzL+9ImYIBq98+zsHMyK5EPAdLtzEQ7fwLJYYjZN+yBJvOeGYaC4OF9xvu2AQNd1VSiLZCz9O5YvxrBwNCxiWaP/XKIk6rqRQv4qEmcUJaYXge0+0YmWusTEjFJAA+eGanXxdBTgNqgjYDMU5VXAW9iEx9gzBpYa0JszkRAQL8DLy0uRleWCy+VSo0gB+5iis2oQjDtgDoMDjqv7CGpKWvFEXzEfGclEEFx1EApFFL5ajFBFvrw7hyW6sB0LFrPwEH9EbWkbnqwXTIeGQH77C/0LlbzbNySITEGKXd+H4c4uxH5kC+snqyfURt2vAj1zHhajVOyAImZTVJhVWrOnC7vhLWycrR0KcuNVgMdJur+xelKL1pe1m5tnG3vUQYsgU7X8dAU84yTKHN18dVjGbUA8T9LeAB6et/fbYA/BAAAAAElFTkSuQmCC";
    var imgDupeTab = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3lBB2gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACOSURBVChTZYxREoIwDERjLS1QMVRTbAzl/reEYHVk9P3t252F9QfYM084TFybKh5Dfz8IxhBv8cqMKnXB1IW2DXEc/VSF8WdqTB9iqAt3Mi4zmS4GUsEp55xoxYvvPBKD2EWhNTWIyFaAZBfiiEWEE4FdSilLIeteWJg1KzO/gVk/j4DkOvkAz7yffvkTG850R6N4cUoNAAAAAElFTkSuQmCC";
    var imgDupeWin = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAMAAADH72RtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAE1QND3MOMXUxLXJPFTSvDTPKCTD6G1OtIkiVFUjLFVfSEFHzJWnNLXfRKHL0VFesUmuwZniwUXbwDIgJEZgMF5QuD7EIMK4vOI9MC8YIB9cGC/IJMPUvV7A1XY9TWK9ObpFvYM1Rbu5xUYjxXZnxaZjQZ6fza7f1b8r4p6t0mbeTpKeTqKirt7i4lbXtocny+Pv6////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAi7bbmQAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACjSURBVChTZcxtF0JAEIbhZUrlpVVhC8VmRWHS/v//pt3TSTnuj9eZZ8itFGK79TzHsW3LstaSlPe6KgWl1HVXqqUkVd/XdaVQHBRTJfVr0k6S51T2M5nf/Anmjd7/pMmvF02jYHYsikjRV5CzsyrCUbjJkjSNQ9ByQrVuObCUZfyhBaBFRG7GSdB9PneGAQBBnIQL9H1/I8nQQhCymAXQDTr5Bg7eK1eegcbvAAAAAElFTkSuQmCC";
    var imgHome = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdB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AAAAAAAAAAAAAAAAAAAD2f4hgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNTDus58AAACpSURBVChTdc1rF4IgDAZgyi4mBTFvpaKmYrD///9oUKc+9X4YO8+2A/MxY5GO747F2gPw3fCDDhrFeaI/G2MpAQg4z+LJmAuplLgIShqgkxQxTzyIJgClZO4Q7VnQxDO6v06mX9fFlmGXARQWj5ttdjA45xIYlIi4VPWpXRGfKbBBE6A1xqJzTg/MR9gnSU1gwy8B3F7Kyln7+AIo2f4FrynN7V4N9Hr/AmKxSjXx2ywhAAAAAElFTkSuQmCC";
    var imgAll = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFAAAAU1JSb3Bxpm4TnXBSlnqMn4xxrq9P7JIP5Y8s9K8N77Aw3ZNP369v57BR+M8M89Aw+fQJ+vNP+fFxi4qKmZiXkZSvpKeTqKirt7i4nKnLsNXP3bGQ1Lax4s+x+vSRxMLF2djX6e/U5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxumegAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACbSURBVChThY1LEoMgDEABtbUooBAVWi2xcv8rWuLooqu+mZDwJh+2ZwKqWmGgcmc5ZqmVVFqqUyyyl53t8jufHUtj4yc6vVwju5IuOfm+dgRtrIvOmqOFlrb9ozVNY+50JwuAorzV81QAQBYBgvdj2U7j03uAwJCnDAyAOa0cWfUigWKglLxgPG0EiEoQnK3Hf1vDASKd/eG/+AIc9XB759IalAAAAABJRU5ErkJggg==";
    var imgFile = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAA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AAAAAAAAAAAAAAAAAWs+nOAAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAC1SURBVChTXY7REoIgEEUXTaOsUEAsBQQC/v8PaXHGl/Zpz7k7sxfK38DJ343bup9CbzFOh+DzPLOy6ZST1lWI4L3iMeeU4nOtFzkYnSunuD3XFYXZkXFmJigbquDGGKUYlVL2BIUQzqGRStyvzQNYuKWU/SIR26aZgC8ie1dTxIZo4NKFt8K8a9EMBajwwTujxrF/deRRoJP1JZaIu7XDp0DrjhIorNVkLUAoY5TS/tIRQoZSfifSRO+0Ao6dAAAAAElFTkSuQmCC";
    var imgPaste = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb4mSnFIxoVYNoG0znXBSnHVw620L4XMwrY4zn4xxp6t07JIP5Y8s77Aw3ZNP369v57BR89Aw8NBQ8tFw+vNP+fFxmZiXkZSvpKeTqKirt7i4kZbKnKnLr7nNrsuzscXR3bGQ1Lax4s+x2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyCQWGwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACaSURBVChTTc/rEoIgEIZhOpcmWpQQBmq1y/1foX2LTtM7/IBnGA5qmibvPAYmkupGu+KU2NnHK0NtishoKEzdZUilQ9YWrV6gbZqm9L5/jzFgxyndUUs4hjl6AYNuABScU9sMJgMPUeCqtb7MQIMA1pUWYKKPwBlVC9A/4BYCbH475L38VOuDdCR5Rga/20v4X6ag5k93Ycl9ATZ1NHYSQjjrAAAAAElFTkSuQmCC";
    var imgPasteDis = "data:image/png;base64,iVBORw0K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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAn2X1wgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAB8SURBVChTXY/REsMgCARJgIvg/39vekfaaafri6wHqt33jRTcCGMVtXdHJEYEHF3VyxEyFptnXBHXRzwjEouLCd9L1O7uQkpAcC5h2M6v6F6QYH+kEuxZaQdvISOq6leoHuGECd3yL2iYOMnhkxgBdfhbdKc9n0bycfODF3FyIvGocUrbAAAAAElFTkSuQmCC";
    var imgCB = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnsK8UpK2sy6Cqqr6msLEaAAAAAAAAAAAAAAAAwbS3DtDGxs6jmZnajYeEvI+LhxcAAAAAAAAAAAAAAAAAAAAAqLGxBa+5ucymsbPwtsDCxcvQ1aDV1twUuauxFK+fpayklZn3jH+A/YuBf9OOh4QaAAAAAAAAAAAAAAAAAAAAAAAAAADX4OK7u8bI+rC5vPvJzdLx3NnesdbM0rO/r7XXlIGH/Yh3evuvo6Ljt6yqGAAAAAAAAAAAAAAAAAAAAAAAAAAA6/DysLTAxP+4wMX7y87T8e3r8Ozt5urt1MbM9rWhqPeeiI7p1MHDh9bGxwcAAAAAAAAAAAAAAAAAAAAAz9reBdvk6L2qtrz/tr3E/NHU2fno5+v37OXp99zO1Pi/q7L2pIuT6su2vGHIsLYCAAAAAAAAAAAAAAAAjJmfAaGvtCGptbuzmaWt+7S7w/vX2t/86Ofr++7o7Pzg0tj8vqiw+5B0ff6pj5Xamn+FKpBzegIAAAAAkpufAoqVmyWJlpyokp+m146aof+3vsX71Njd/eno7P3v5+z93s/W/begqP17XGb9clVd9H1iaL19ZmsyemhsApCZnSSIkpbHg4+VyYuXnumLmJ//qa63/tTX3f7z8vb+9O3x/eTV3P22nab9dlZg/l1BSPtgSE3ocl9ivoJwcyaWn6O9fIWKz4aRlqaTnqTEmaat/7K4wf/W2eD+8e/0/fDp7vrj09r4uqGr8oFkbfxpT1XmUTtAw2VSVsCSgYTDAAAAAAAAAAAAAAAAq7S6U7/IztG2vcT+2Nrg8+rn7fzp3+b43s3V6ragqdWxmKCqkXh/LQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NvigdHS2fDl3uf+3tDa/s+8xuzRu8RsAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjc4wvX193A5uLo/d/U2v7Wyc/Z1sbMEAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OPp2eDc4fLVy9H75dnfmwAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** VARS ***** //
    var button = this;
    var URLs = [];
    var homeURLs = [];
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
    // ***** FUNCTIONS ***** //
    function getURLs(loc){
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            URLs = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return URLs;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLs[URLs.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLs[URLs.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    this.newTab = function(url) {
      if(url == "home") {
        var urls = gHomeButton.getHomePage().split("|");
        gBrowser.selectedTab = gBrowser.addTab(urls[0]);
        for(var i = 1; i < urls.length; ++i) {
          try {
            gBrowser.addTab(urls[i]);
          } catch (ex) {
          }
        }
      } else if(url == "file") {
        try {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, gNavigatorBundle.getString("openFile"),
                           nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterAll |
                           nsIFilePicker.filterText |
                           nsIFilePicker.filterImages |
                           nsIFilePicker.filterXML |
                           nsIFilePicker.filterHTML);
          if(fp.show() == nsIFilePicker.returnOK)
            gBrowser.selectedTab = gBrowser.addTab(fp.fileURL.spec);
        } catch (ex) {
        }
      } else if(url == "DupeTab") {
        gBrowser.selectedTab = gBrowser.duplicateTab(gBrowser.selectedTab);
      } else if(url == "DupeWin") {
            var SelectedTab = gBrowser.selectedTab;
    	window.open();
            var NewWin = wm.getMostRecentWindow ("navigator:browser");
            var cBrowser = NewWin.gBrowser;
            var DupeTab = cBrowser.duplicateTab(SelectedTab);
            cBrowser.selectedTab = DupeTab;
            cBrowser.mTabContainer.advanceSelectedTab(-1, true);
            cBrowser.removeCurrentTab();
      } else gBrowser.selectedTab = gBrowser.addTab(url);
    }
    this.popupShowing = function(node) {
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {}
      mPopup.lastChild.setAttribute("disabled", !pasteURL ? true : false);
      mPopup.lastChild.setAttribute("image", !pasteURL ? imgPasteDis : imgPaste);
    }
    function addMenuitem(label, url, img, obj, menu) {
      var mItem = document.createElement("menuitem");
      mItem.setAttribute("label", label);
      mItem.setAttribute("image", img);
      mItem.func = obj.newTab.bind(obj);
      mItem.setAttribute("oncommand", "this.func(" + url + ")");
      menu.appendChild(mItem);
    }
    PopulateSub = function() {
        while (subCurrPopup.hasChildNodes())
    	   subCurrPopup.removeChild(subCurrPopup.firstChild);
        getURLs(content.location);
        l = URLs.length;
        addMenuitem(content.location, '"'+content.location+'"', "http://www.google.com/s2/favicons?domain="+(content.location.href.split(/\/+/g)[1]), button, subCurrPopup);
        if (l > 0) {
          for (var i = 0; i < l; i++) {
            if (URLs[i] == "about:blank")
                addMenuitem(URLs[i], '"'+URLs[i]+'"', imgBlank, button, subCurrPopup);
            else
                addMenuitem(URLs[i], '"'+URLs[i]+'"', "http://www.google.com/s2/favicons?domain="+(URLs[i].split(/\/+/g)[1]), button, subCurrPopup);
          }
        }
    }
    PopulateHomeSub = function() {
        var mItems, mItem;
        homeURLS = [];
        while (subHomePopup.hasChildNodes())
    	   subHomePopup.removeChild(subHomePopup.firstChild);
        homeURLs = gHomeButton.getHomePage().split("|");
        var hL = homeURLs.length;
        if (hL > 1) {
          addMenuitem("Open all in new tabs", "'home'", imgAll, button, subHomePopup);
          subHomePopup.appendChild(document.createElement("menuseparator"));
        }
        for(var j = 0; j < hL; j++) {
          if (homeURLs[j] == "about:blank")
            addMenuitem(homeURLs[j], '"'+homeURLs[j]+'"', imgBlank, button, subHomePopup);
          else
            addMenuitem(homeURLs[j], '"'+homeURLs[j]+'"', "http://www.google.com/s2/favicons?domain="+(homeURLs[j].split(/\/+/g)[1]), button, subHomePopup);
        }
    }
    // ***** INITIALISATION ***** //
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    addMenuitem("Blank Page", null, imgBlank, this, mPopup);
    var subCurrPopup = document.createElement("menupopup");
    subCurrPopup.popupShowing = PopulateSub();
    subCurrPopup.setAttribute("onpopupshowing", "PopulateSub();");
    var subCurrMenu = document.createElement("menu");
    subCurrMenu.setAttribute("label", "Current URL");
    subCurrMenu.setAttribute("image", imgCurr);
    subCurrMenu.appendChild(subCurrPopup);
    mPopup.appendChild(subCurrMenu);
    var subDupePopup = document.createElement("menupopup");
    addMenuitem("...in this window", "'DupeTab'", imgDupeTab, this, subDupePopup);
    addMenuitem("...in new window", "'DupeWin'", imgDupeWin, this, subDupePopup);
    var subDupeMenu = document.createElement("menu");
    subDupeMenu.setAttribute("label", "Duplicate tab");
    subDupeMenu.setAttribute("image", imgDupe);
    subDupeMenu.appendChild(subDupePopup);
    mPopup.appendChild(subDupeMenu);
    var subHomePopup = document.createElement("menupopup");
    subHomePopup.id = "subHomepopup";
    subHomePopup.popupShowing = PopulateHomeSub();
    subHomePopup.setAttribute("onpopupshowing", "PopulateHomeSub();");
    var subHomeMenu = document.createElement("menu");
    subHomeMenu.setAttribute("label", "Home page(s)");
    subHomeMenu.setAttribute("image", imgHome);
    subHomeMenu.appendChild(subHomePopup);
    mPopup.appendChild(subHomeMenu);
    var menusep = mPopup.appendChild(document.createElement("menuseparator"));
    addMenuitem("From File", "'file'", imgFile, this, mPopup);
    addMenuitem("From Clipboard", "readFromClipboard()", imgPaste, this, mPopup);
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, newTabButtonObserver)");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, newTabButtonObserver)");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, newTabButtonObserver)");
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, LouCypher');
    this.setAttribute('version','6');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/new-tab2.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left clicking the main button opens a standard new tab.
    Left clicking the drop-marker opens the dropdown menu from which you can open a new tab with one of these options:
        - Blank page
        - Current URL sub-menu (the number of levels will, of course, vary depending on the URL):
            - Current URL
            - Up one level (if applicable)
            - Up two levels (if applicable)
              (...and so on until...)
            - Curent sub-domain (if applicable)
            - Current domain (if different from current URL)
        - Duplicate tab sub-menu:
            - Duplicate in this window
            - Duplicate in new window
        - Home page(s) sub-menu
            - Open all home page tabs (if home page consists of more than one tab)
            - Individual items for each home page tab
            - ...
        - From a file
        - URL from clipboard
  326. New Tab² (menu button)

    Code Tab

    /* 
        This is an adaptation of LouCypher's New Tab with menu button: http://custombuttons2.com/forum/post2851.html#p2851
        Left clicking opens the dropdown menu from which you can open a new tab with one of these options:
            - Blank page
            - Current URL sub-menu (the number of levels will, of course, vary depending on the URL):
                - Current URL
                - Up one level (if applicable)
                - Up two levels (if applicable)
                  (...and so on until...)
                - Curent sub-domain (if applicable)
                - Current domain (if different from current URL)
            - Duplicate tab sub-menu:
                - Duplicate in this window
                - Duplicate in new window
            - Home page(s) sub-menu
                - Open all home page tabs (if home page consists of more than one tab)
                - Individual items for each home page tab
                - ...
            - From a file
            - URL from clipboard
        Rawny ^^
    */
    

    Initialization Tab

    // ***** IMAGES/ICONS ***** //
    var imgBlank = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb3Bxa3KPi4qKkZSvqKirt7i4nKnLr7nNscXRzbzJxMLF2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALGj63gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABVSURBVChTrY9LDoAwCAXrpwotD+5/2kprotS1s5xMXiAxpMNER+sksRtBGeYRMONJUOG651D4SD7XIEzBsgShgOAt1AE+QqFz4dG/Yvyn1kfrFvBLL1FCMUlGtzzyAAAAAElFTkSuQmCC";
    var imgCurr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAU1JS7v8AmZiXqKirxMLF2djX5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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABJSURBVChTrcxBDoAgDETRGcHC/S9cpykaLVvfpsnPALzAP4FBX+WF8wh0TukswYgcaBIDTV5hBMO0L1hLfV2FfHx7wlgFZ7GFCwKcXMPAsFH9AAAAAElFTkSuQmCC";
    var imgDupe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG6SURBVDjLxVNNKERRFP7ue0/JiIxXyE8aq/HTSP4iG2JpYSEL0qzYWFgrG8zCVopSs5CVnZVIWbFAYuG3NGaKmCz8z9z37rvuvTN+htSUhVPfPefczvd1zrldwjnHX0zDH+3/BQx5BIPBDuGmBJrS5F0IjPr9/hUjeTHj83m9BQWmSghRZzL+9ImYIBq98+zsHMyK5EPAdLtzEQ7fwLJYYjZN+yBJvOeGYaC4OF9xvu2AQNd1VSiLZCz9O5YvxrBwNCxiWaP/XKIk6rqRQv4qEmcUJaYXge0+0YmWusTEjFJAA+eGanXxdBTgNqgjYDMU5VXAW9iEx9gzBpYa0JszkRAQL8DLy0uRleWCy+VSo0gB+5iis2oQjDtgDoMDjqv7CGpKWvFEXzEfGclEEFx1EApFFL5ajFBFvrw7hyW6sB0LFrPwEH9EbWkbnqwXTIeGQH77C/0LlbzbNySITEGKXd+H4c4uxH5kC+snqyfURt2vAj1zHhajVOyAImZTVJhVWrOnC7vhLWycrR0KcuNVgMdJur+xelKL1pe1m5tnG3vUQYsgU7X8dAU84yTKHN18dVjGbUA8T9LeAB6et/fbYA/BAAAAAElFTkSuQmCC";
    var imgDupeTab = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3lBB2gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACOSURBVChTZYxREoIwDERjLS1QMVRTbAzl/reEYHVk9P3t252F9QfYM084TFybKh5Dfz8IxhBv8cqMKnXB1IW2DXEc/VSF8WdqTB9iqAt3Mi4zmS4GUsEp55xoxYvvPBKD2EWhNTWIyFaAZBfiiEWEE4FdSilLIeteWJg1KzO/gVk/j4DkOvkAz7yffvkTG850R6N4cUoNAAAAAElFTkSuQmCC";
    var imgDupeWin = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAMAAADH72RtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAE1QND3MOMXUxLXJPFTSvDTPKCTD6G1OtIkiVFUjLFVfSEFHzJWnNLXfRKHL0VFesUmuwZniwUXbwDIgJEZgMF5QuD7EIMK4vOI9MC8YIB9cGC/IJMPUvV7A1XY9TWK9ObpFvYM1Rbu5xUYjxXZnxaZjQZ6fza7f1b8r4p6t0mbeTpKeTqKirt7i4lbXtocny+Pv6////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAi7bbmQAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACjSURBVChTZcxtF0JAEIbhZUrlpVVhC8VmRWHS/v//pt3TSTnuj9eZZ8itFGK79TzHsW3LstaSlPe6KgWl1HVXqqUkVd/XdaVQHBRTJfVr0k6S51T2M5nf/Anmjd7/pMmvF02jYHYsikjRV5CzsyrCUbjJkjSNQ9ByQrVuObCUZfyhBaBFRG7GSdB9PneGAQBBnIQL9H1/I8nQQhCymAXQDTr5Bg7eK1eegcbvAAAAAElFTkSuQmCC";
    var imgHome = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQ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AAAAAAD2f4hgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNTDus58AAACpSURBVChTdc1rF4IgDAZgyi4mBTFvpaKmYrD///9oUKc+9X4YO8+2A/MxY5GO747F2gPw3fCDDhrFeaI/G2MpAQg4z+LJmAuplLgIShqgkxQxTzyIJgClZO4Q7VnQxDO6v06mX9fFlmGXARQWj5ttdjA45xIYlIi4VPWpXRGfKbBBE6A1xqJzTg/MR9gnSU1gwy8B3F7Kyln7+AIo2f4FrynN7V4N9Hr/AmKxSjXx2ywhAAAAAElFTkSuQmCC";
    var imgAll = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFAAAAU1JSb3Bxpm4TnXBSlnqMn4xxrq9P7JIP5Y8s9K8N77Aw3ZNP369v57BR+M8M89Aw+fQJ+vNP+fFxi4qKmZiXkZSvpKeTqKirt7i4nKnLsNXP3bGQ1Lax4s+x+vSRxMLF2djX6e/U5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxumegAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACbSURBVChThY1LEoMgDEABtbUooBAVWi2xcv8rWuLooqu+mZDwJh+2ZwKqWmGgcmc5ZqmVVFqqUyyyl53t8jufHUtj4yc6vVwju5IuOfm+dgRtrIvOmqOFlrb9ozVNY+50JwuAorzV81QAQBYBgvdj2U7j03uAwJCnDAyAOa0cWfUigWKglLxgPG0EiEoQnK3Hf1vDASKd/eG/+AIc9XB759IalAAAAABJRU5ErkJggg==";
    var imgFile = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPA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AAAAWs+nOAAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAC1SURBVChTXY7REoIgEEUXTaOsUEAsBQQC/v8PaXHGl/Zpz7k7sxfK38DJ343bup9CbzFOh+DzPLOy6ZST1lWI4L3iMeeU4nOtFzkYnSunuD3XFYXZkXFmJigbquDGGKUYlVL2BIUQzqGRStyvzQNYuKWU/SIR26aZgC8ie1dTxIZo4NKFt8K8a9EMBajwwTujxrF/deRRoJP1JZaIu7XDp0DrjhIorNVkLUAoY5TS/tIRQoZSfifSRO+0Ao6dAAAAAElFTkSuQmCC";
    var imgPaste = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAb4mSnFIxoVYNoG0znXBSnHVw620L4XMwrY4zn4xxp6t07JIP5Y8s77Aw3ZNP369v57BR89Aw8NBQ8tFw+vNP+fFxmZiXkZSvpKeTqKirt7i4kZbKnKnLr7nNrsuzscXR3bGQ1Lax4s+x2djX0dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyCQWGwAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACaSURBVChTTc/rEoIgEIZhOpcmWpQQBmq1y/1foX2LTtM7/IBnGA5qmibvPAYmkupGu+KU2NnHK0NtishoKEzdZUilQ9YWrV6gbZqm9L5/jzFgxyndUUs4hjl6AYNuABScU9sMJgMPUeCqtb7MQIMA1pUWYKKPwBlVC9A/4BYCbH475L38VOuDdCR5Rga/20v4X6ag5k93Ycl9ATZ1NHYSQjjrAAAAAElFTkSuQmCC";
    var imgPasteDis = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAn2X1wgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAAB8SURBVChTXY/REsMgCARJgIvg/39vekfaaafri6wHqt33jRTcCGMVtXdHJEYEHF3VyxEyFptnXBHXRzwjEouLCd9L1O7uQkpAcC5h2M6v6F6QYH+kEuxZaQdvISOq6leoHuGECd3yL2iYOMnhkxgBdfhbdKc9n0bycfODF3FyIvGocUrbAAAAAElFTkSuQmCC";
    var imgCB = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnsK8UpK2sy6Cqqr6msLEaAAAAAAAAAAAAAAAAwbS3DtDGxs6jmZnajYeEvI+LhxcAAAAAAAAAAAAAAAAAAAAAqLGxBa+5ucymsbPwtsDCxcvQ1aDV1twUuauxFK+fpayklZn3jH+A/YuBf9OOh4QaAAAAAAAAAAAAAAAAAAAAAAAAAADX4OK7u8bI+rC5vPvJzdLx3NnesdbM0rO/r7XXlIGH/Yh3evuvo6Ljt6yqGAAAAAAAAAAAAAAAAAAAAAAAAAAA6/DysLTAxP+4wMX7y87T8e3r8Ozt5urt1MbM9rWhqPeeiI7p1MHDh9bGxwcAAAAAAAAAAAAAAAAAAAAAz9reBdvk6L2qtrz/tr3E/NHU2fno5+v37OXp99zO1Pi/q7L2pIuT6su2vGHIsLYCAAAAAAAAAAAAAAAAjJmfAaGvtCGptbuzmaWt+7S7w/vX2t/86Ofr++7o7Pzg0tj8vqiw+5B0ff6pj5Xamn+FKpBzegIAAAAAkpufAoqVmyWJlpyokp+m146aof+3vsX71Njd/eno7P3v5+z93s/W/begqP17XGb9clVd9H1iaL19ZmsyemhsApCZnSSIkpbHg4+VyYuXnumLmJ//qa63/tTX3f7z8vb+9O3x/eTV3P22nab9dlZg/l1BSPtgSE3ocl9ivoJwcyaWn6O9fIWKz4aRlqaTnqTEmaat/7K4wf/W2eD+8e/0/fDp7vrj09r4uqGr8oFkbfxpT1XmUTtAw2VSVsCSgYTDAAAAAAAAAAAAAAAAq7S6U7/IztG2vcT+2Nrg8+rn7fzp3+b43s3V6ragqdWxmKCqkXh/LQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NvigdHS2fDl3uf+3tDa/s+8xuzRu8RsAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjc4wvX193A5uLo/d/U2v7Wyc/Z1sbMEAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OPp2eDc4fLVy9H75dnfmwAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** VARS ***** //
    var button = this;
    var URLs = [];
    var homeURLs = [];
    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
    // ***** FUNCTIONS ***** //
    function getURLs(loc){
    //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869
            URLs = [];
    	try {
    		//check for validity
    		if ('about:'==loc.protocol) return URLs;
    		//get the URL
    		var path=loc.href;
    		//strip off the scheme and host
    		path=path.replace(/^.*:\/\/[^\/]*\//, '');
    		//and the trailing slash if there
    		path=path.replace(/\/$/, '');
    		//and any extra leading slashes
    		path=path.replace(/^\/+/, '');
    		var host=loc.host;
    		var scheme=loc.protocol+'//';
    		var emptyPath=(''==path);
    		//strip hash if there
    		if (path.indexOf('#')>0) {
    			path=path.replace(/#.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip querystring if there
    		if (path.indexOf('?')>0) {
    			path=path.replace(/\?.*/, '');
    			URLs[URLs.length]=scheme+host+'/'+path;
    		}
    		//strip files/directories if there
    		while (path.indexOf('/')>0) {
    			path=path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length]=scheme+host+'/'+path+'/';
    		}
    		//host only
    		if (!emptyPath) URLs[URLs.length]=scheme+host+'/';
    		//strip subdomains if there
    		if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP
    			var hostSuffix='';
    			// strip port
    			var x=host.lastIndexOf(':');
    			if (x>0) {
    				hostSuffix=host.substr(x);
    				host=host.substr(0, x);
    			}
    			// strip TLD
    			hostSuffix=host.substr(host.length-6)+hostSuffix;
    			host=host.substr(0, host.length-6);
    			while (-1!=host.indexOf('.')) {
    				host=host.replace(/[^.]*\./, '');
    				URLs[URLs.length]=scheme+host+hostSuffix+'/';
    			}
    		}
    	} catch (e) { }
    }
    this.newTab = function(url) {
      if(url == "home") {
        var urls = gHomeButton.getHomePage().split("|");
        gBrowser.selectedTab = gBrowser.addTab(urls[0]);
        for(var i = 1; i < urls.length; ++i) {
          try {
            gBrowser.addTab(urls[i]);
          } catch (ex) {
          }
        }
      } else if(url == "file") {
        try {
          const nsIFilePicker = Components.interfaces.nsIFilePicker;
          var fp = Components.classes['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, gNavigatorBundle.getString("openFile"),
                           nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterAll |
                           nsIFilePicker.filterText |
                           nsIFilePicker.filterImages |
                           nsIFilePicker.filterXML |
                           nsIFilePicker.filterHTML);
          if(fp.show() == nsIFilePicker.returnOK)
            gBrowser.selectedTab = gBrowser.addTab(fp.fileURL.spec);
        } catch (ex) {
        }
      } else if(url == "DupeTab") {
        gBrowser.selectedTab = gBrowser.duplicateTab(gBrowser.selectedTab);
      } else if(url == "DupeWin") {
            var SelectedTab = gBrowser.selectedTab;
    	window.open();
            var NewWin = wm.getMostRecentWindow ("navigator:browser");
            var cBrowser = NewWin.gBrowser;
            var DupeTab = cBrowser.duplicateTab(SelectedTab);
            cBrowser.selectedTab = DupeTab;
            cBrowser.mTabContainer.advanceSelectedTab(-1, true);
            cBrowser.removeCurrentTab();
      } else gBrowser.selectedTab = gBrowser.addTab(url);
    }
    this.popupShowing = function(node) {
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {}
      mPopup.lastChild.setAttribute("disabled", !pasteURL ? true : false);
      mPopup.lastChild.setAttribute("image", !pasteURL ? imgPasteDis : imgPaste);
    }
    function addMenuitem(label, url, img, obj, menu) {
      var mItem = document.createElement("menuitem");
      mItem.setAttribute("label", label);
      mItem.setAttribute("image", img);
      mItem.func = obj.newTab.bind(obj);
      mItem.setAttribute("oncommand", "this.func(" + url + ")");
      menu.appendChild(mItem);
    }
    PopulateSub = function() {
        while (subCurrPopup.hasChildNodes())
    	   subCurrPopup.removeChild(subCurrPopup.firstChild);
        getURLs(content.location);
        l = URLs.length;
        addMenuitem(content.location, '"'+content.location+'"', "http://www.google.com/s2/favicons?domain="+(content.location.href.split(/\/+/g)[1]), button, subCurrPopup);
        if (l > 0) {
          for (var i = 0; i < l; i++) {
            if (URLs[i] == "about:blank")
                addMenuitem(URLs[i], '"'+URLs[i]+'"', imgBlank, button, subCurrPopup);
            else
                addMenuitem(URLs[i], '"'+URLs[i]+'"', "http://www.google.com/s2/favicons?domain="+(URLs[i].split(/\/+/g)[1]), button, subCurrPopup);
          }
        }
    }
    PopulateHomeSub = function() {
        var mItems, mItem;
        homeURLS = [];
        while (subHomePopup.hasChildNodes())
    	   subHomePopup.removeChild(subHomePopup.firstChild);
        homeURLs = gHomeButton.getHomePage().split("|");
        var hL = homeURLs.length;
        if (hL > 1) {
          addMenuitem("Open all in new tabs", "'home'", imgAll, button, subHomePopup);
          subHomePopup.appendChild(document.createElement("menuseparator"));
        }
        for(var j = 0; j < hL; j++) {
          if (homeURLs[j] == "about:blank")
            addMenuitem(homeURLs[j], '"'+homeURLs[j]+'"', imgBlank, button, subHomePopup);
          else
            addMenuitem(homeURLs[j], '"'+homeURLs[j]+'"', "http://www.google.com/s2/favicons?domain="+(homeURLs[j].split(/\/+/g)[1]), button, subHomePopup);
        }
    }
    // ***** INITIALISATION ***** //
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    addMenuitem("Blank Page", null, imgBlank, this, mPopup);
    var subCurrPopup = document.createElement("menupopup");
    subCurrPopup.popupShowing = PopulateSub();
    subCurrPopup.setAttribute("onpopupshowing", "PopulateSub();");
    var subCurrMenu = document.createElement("menu");
    subCurrMenu.setAttribute("label", "Current URL");
    subCurrMenu.setAttribute("image", imgCurr);
    subCurrMenu.appendChild(subCurrPopup);
    mPopup.appendChild(subCurrMenu);
    var subDupePopup = document.createElement("menupopup");
    addMenuitem("...in this window", "'DupeTab'", imgDupeTab, this, subDupePopup);
    addMenuitem("...in new window", "'DupeWin'", imgDupeWin, this, subDupePopup);
    var subDupeMenu = document.createElement("menu");
    subDupeMenu.setAttribute("label", "Duplicate tab");
    subDupeMenu.setAttribute("image", imgDupe);
    subDupeMenu.appendChild(subDupePopup);
    mPopup.appendChild(subDupeMenu);
    var subHomePopup = document.createElement("menupopup");
    subHomePopup.id = "subHomepopup";
    subHomePopup.popupShowing = PopulateHomeSub();
    subHomePopup.setAttribute("onpopupshowing", "PopulateHomeSub();");
    var subHomeMenu = document.createElement("menu");
    subHomeMenu.setAttribute("label", "Home page(s)");
    subHomeMenu.setAttribute("image", imgHome);
    subHomeMenu.appendChild(subHomePopup);
    mPopup.appendChild(subHomeMenu);
    var menusep = mPopup.appendChild(document.createElement("menuseparator"));
    addMenuitem("From File", "'file'", imgFile, this, mPopup);
    addMenuitem("From Clipboard", "readFromClipboard()", imgPaste, this, mPopup);
    this.appendChild(mPopup);
    this.type = "menu";
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, newTabButtonObserver)");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, newTabButtonObserver)");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, newTabButtonObserver)");
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, LouCypher');
    this.setAttribute('version','6');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/new-tab2.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left clicking opens the dropdown menu from which you can open a new tab with one of these options:
        - Blank page
        - Current URL sub-menu (the number of levels will, of course, vary depending on the URL):
            - Current URL
            - Up one level (if applicable)
            - Up two levels (if applicable)
              (...and so on until...)
            - Curent sub-domain (if applicable)
            - Current domain (if different from current URL)
        - Duplicate tab sub-menu:
            - Duplicate in this window
            - Duplicate in new window
        - Home page(s) sub-menu
            - Open all home page tabs (if home page consists of more than one tab)
            - Individual items for each home page tab
            - ...
        - From a file
        - URL from clipboard
  327. Next / Expand All / Mark All - tb

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler --------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      cmd_nextUnreadThread,);
    };
    this.midclick = function(evt)
    {
      cmd_expandAllThreads;
    };
    this.rightclick = function(evt)
    {
      cmd_markAllRead;
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20081228.00tb');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/next-expand-all-mark-all-thundrbird.html');
    this.setAttribute('dependency','Cb2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help set for
    <label> button
    custombuttons-button<id>
  328. Next Track

    Code Tab

    foxytunesDispatchPlayerCommand('Next', true);

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/foxytunes-button-group.html');

    Help Tab

  329. Next/SelectAll/Previous

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	goDoCommand('cmd_nextMsg');
    }
    this.midclick    = function(evt){
    	goDoCommand('cmd_selectAll')
    }
    this.rightclick  = function(evt){
    	goDoCommand('cmd_previousMsg');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20090101');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/nextselect-allprevious-thunderbird.html');
    this.setAttribute('dependency','TB3.0.*,  TB2.0*, CB2 2.0.9.51*');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    //this.tooltipText = ' L: Next   M: SelectAll   R: Previous ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    /*------------------------- Tooltip Block Start ------------------------------*/
    // ver 20090101.0200
    var sp = " ";  // hard space
    let cr = " ";  // hard space
       cr = (custombuttons.compareVersion( custombuttons.gAppVersion(), "3*" ) >= 0)? "\n " : cr ;   
    // Delete any unused lines.
    var ttip = " L:    Next Message"
        +cr+sp+" M:    Select All "
        +cr+sp+" R:    Previous Message ";
    this.tooltipText += sp+cr+sp+ttip+sp+sp;
    /*--------------------------- Tooltip Block End ------------------------------*/
    

    Help Tab

    Help%3A%0A%0A%0A%20%20%20%20%20Left-click%3A%20%20Next%20Message%0A%20%20%20%20%20Middle-click%3A%20%20Select%20All%0A%20%20%20%20%20Right-click%3A%20%20Previous%20Message%0A%0A%20%20%20%20%20Shift-click%3A%20%20CustomButtons%20context%20menu%0A%0A%0A%20%20%20%20%0A%0A
  330. Nircmd: open close cd drive

    Code Tab

    /*Code*/

    Initialization Tab

    this.leftclick = function(evt){
    function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd cdrom open");
    }
    this.midclick = function(evt)
    {
      function runProgram(progPath, arg)
      {
        var argArray = arg ? arg.split(/\s+/) : [];
        var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
            .getService(Components.interfaces.nsILocalFile);
        var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
            .getService(Components.interfaces.nsIProcess);
        nsILocalFile.initWithPath(progPath);
        nsIProcess.init(nsILocalFile);
        nsIProcess.run(false, argArray, argArray.length);
        return nsILocalFile;
      }
      runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd cdrom close");
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '1.0';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute('author','nicholas and pqwoerituytrueiwoq');
    this.setAttribute('version','1.0');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/nircmd-button-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText =  this.label + "\n" + 
                        "  L:open cd drive" + "\n" +
                        "  M:close cd drive" + "\n" +
                        "  R:context mune";
    

    Help Tab

        Left  : Open cd drive
        Middle: Close cd drive
        Right : Context Menu
    
  331. Nircmd: ScreenShot

    Code Tab

    /*Code*/

    Initialization Tab

    this.leftclick = function(evt){
    	function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd savescreenshot ~$folder.desktop$\\shot.png");
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd clipboard set ~$folder.desktop$\\shot.png");
    }
    this.cmidclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd filldelete ~$folder.desktop$\\shot.png");
    }
    this.midclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd exec show c:\\windows\\system32\\mspaint.exe ~q~$folder.desktop$\\shot.png~q");
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.style.opacity = '1.0';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute('author','nicholas, pqwoerituytrueiwoq');
    this.setAttribute('version','2.1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/nircmd-button-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText =  this.label + "\n" + 
                        "  L:Take,save to desktop, and place address on clipboard" + "\n" +
                        "  M:Edit saved image in paint" + "\n" +
                        "  Shift M:delte saved image";
    

    Help Tab

          Left         : Take snapShot, & save to desktop,
                         Then place address on clipboard
          Middle       : Edit saved image in paint
          Shift Middle : Delete saved image
    
  332. Nircmd: ScreenShot

    Code Tab

    /*Code*/

    Initialization Tab

    this.leftclick = function(evt){
    	function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd savescreenshot ~$folder.desktop$\\shot.png");
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd clipboard set ~$folder.desktop$\\shot.png");
    }
    this.cmidclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd filldelete ~$folder.desktop$\\shot.png");
    }
    this.midclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd exec show c:\\windows\\system32\\mspaint.exe ~q~$folder.desktop$\\shot.png~q");
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.style.opacity = '1.0';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute('author','nicholas, pqwoerituytrueiwoq');
    this.setAttribute('version','2.1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/nircmd-button-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText =  this.label + "\n" + 
                        "  L:Take,save to desktop, and place address on clipboard" + "\n" +
                        "  M:Edit saved image in paint" + "\n" +
                        "  Shift M:delte saved image";
    

    Help Tab

          Left         : Take snapShot, & save to desktop,
                         Then place address on clipboard
          Middle       : Edit saved image in paint
          Shift Middle : Delete saved image
    
  333. Nircmd: ScreenShot

    Code Tab

    /*Code*/

    Initialization Tab

    this.leftclick = function(evt){
    	function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd savescreenshot ~$folder.desktop$\\shot.png");
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd clipboard set ~$folder.desktop$\\shot.png");
    }
    this.cmidclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd filldelete ~$folder.desktop$\\shot.png");
    }
    this.midclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd exec show c:\\windows\\system32\\mspaint.exe ~q~$folder.desktop$\\shot.png~q");
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.style.opacity = '1.0';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute('author','nicholas, pqwoerituytrueiwoq');
    this.setAttribute('version','2.1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/nircmd-button-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText =  this.label + "\n" + 
                        "  L:Take,save to desktop, and place address on clipboard" + "\n" +
                        "  M:Edit saved image in paint" + "\n" +
                        "  Shift M:delte saved image";
    

    Help Tab

          Left         : Take snapShot, & save to desktop,
                         Then place address on clipboard
          Middle       : Edit saved image in paint
          Shift Middle : Delete saved image
    
  334. Nircmd: ScreenShot

    Code Tab

    /*Code*/

    Initialization Tab

    this.leftclick = function(evt){
    	function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd savescreenshot ~$folder.desktop$\\shot.png");
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd clipboard set ~$folder.desktop$\\shot.png");
    }
    this.cmidclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd filldelete ~$folder.desktop$\\shot.png");
    }
    this.midclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","nircmd exec show c:\\windows\\system32\\mspaint.exe ~q~$folder.desktop$\\shot.png~q");
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.style.opacity = '1.0';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute('author','nicholas, pqwoerituytrueiwoq');
    this.setAttribute('version','2.1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/nircmd-button-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText =  this.label + "\n" + 
                        "  L:Take,save to desktop, and place address on clipboard" + "\n" +
                        "  M:Edit saved image in paint" + "\n" +
                        "  Shift M:delte saved image";
    

    Help Tab

          Left         : Take snapShot, & save to desktop,
                         Then place address on clipboard
          Middle       : Edit saved image in paint
          Shift Middle : Delete saved image
    
  335. Nircmd: Terminate IE

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.cleftclick = function(evt){
    function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","killprocess iexplore.exe");
    }
    "C:\Program Files\Internet Explorer\iexplore.exe"
    this.leftclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\WINDOWS\\system32\\nircmd.exe","closeprocess iexplore.exe");
    }
    this.cmidclick = function(evt){
    		function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      return nsILocalFile;
    }
    runProgram("C:\\Program Files\\Internet Explorer\\iexplore.exe","about:blank");
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.style.opacity = '1.0';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.tooltipText =  this.label + "\n" + 
                        "  L:Close IE" + "\n" +
                        "  C+L:Kill IE" + "\n" +
                        "  C+M:Open IE";
    this.setAttribute('author','nicholas and pqwoerituytrueiwoq');
    this.setAttribute('version','1.0');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/nircmd-button-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

      Left - Close IE
      Ctrl+Left - Kill IE
      Ctrl+Middle - Open IE
    
  336. Note² Button

    Code Tab

    /*Code*/
    /*Start Code Statments */
    this.doLeft(event);
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    this.properties = {
    	en_US:{
    		zLast:'Last no Comma'
    	}
    };
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    var End = Cb.isPref("tagIt.index",0);
    this.info = '\n\nBBCode: [note]Clipboard[/note]\n\nHTML: <!--Clipboard-->';
    this.ss = [
    	{ label: 'BBCode', open: '[note]', open1: '[note]%h', close: '[/note]', sItemId: '' },
    	{ label: 'HTML'  , open: '<!--'  , open1: '<!--%h', close: '-->'      , sItemId: ''}];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.amidclick = function(evt)
    {};
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
    	index 		: 0,
    	listo 		: '',
    	liste 		: '',
    	listc		: '',
    	theBox		: {},
    	startPos 	: 0,
    	endPos 		: 0,
    	oPosition 	: 0,
    	oHeight 	: 0,
    	text		: '',
    	nHeight		: 0,
    	Highlight	: '',
    	eBlock		: '',
    	cBoard		: '',
    	n		: '',
    	initMeth	: function( oBtn ){
    				this.index	= Number(Cb.getPrefs("tagIt.index"));
    				this.listo 	= oBtn.ss[this.index].open;
    				this.liste 	= oBtn.ss[this.index].open1;
    				this.listc	= oBtn.ss[this.index].close;
    				this.theBox	= document.commandDispatcher.focusedElement;
    				if ( this.theBox ) {
    					this.startPos 	= this.theBox.selectionStart;
    					this.endPos 	= this.theBox.selectionEnd;
    					this.oPosition 	= this.theBox.scrollTop;
    					this.oHeight 	= this.theBox.scrollHeight;
    					this.text	= this.theBox.value.substring(0,this.startPos);
    					this.nHeight	= this.theBox.scrollHeight - this.oHeight;
    					this.Highlight	= this.theBox.value.substring(this.startPos, this.endPos);
    					this.eBlock	= this.theBox.value.substring(this.endPos, this.theBox.value.length);
    					this.cBoard	= gClipboard.read();
    					this.n		= '';
    					return true;
    				} // End if ( this.theBox )
    				return false;
    			} // End initMeth
    };
    this.doLeft = function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.Highlight) {	// THEBOX CONTAINS NOTHING HIGHLITED.
    		switch(this.pref){
    		case 1:
    			x.text += x.listc + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=0;
    			this.checked=false;
    			break;
    		case 0:
    			x.text += x.listo;
    			x.text += x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=1;
    			this.checked=true;
    			break;
    		}
    	} else {	// THEBOX CONTAINS SOMETHING HIGHLITED.
    		x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
    		var nLen = x.n.length;
    		x.text += x.n + x.eBlock;
    		x.theBox.value = x.text;
    		x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    		x.theBox.scrollTop = x.oPosition + x.nHeight;
    	}
    }; // End this.doLeft*/
    this.doMid= function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.cBoard) {
    		alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
    		return;
    	}
    	x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
    	var nLen = x.n.length;
    	x.text += x.n;
    	x.theBox.value = x.text + x.eBlock;
    	x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    	x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
    	var prefstring = "tagIt.index";
    	try {
    		var ssIdx = Cb.getPrefs(prefstring);
    	} catch(ex) {
    		var ssIdx = 0;
    		Cb.setPrefs(prefstring, ssIdx);
    	}
    	var aNodes = this.mObj.getItemsById('Note');
    	for(var i = 0; i < aNodes.length; i++) {
    		aNodes[i].setAttribute("checked",false);
    	}
    	aNodes[ssIdx].setAttribute("checked", true);
    }; // End this.getIndex(aNode)
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
    	var prefstring = "tagIt.index";
    	Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
    	x.mObj.listener = function(x){x.getIndex();};
    	x.mObj.setSub();
    	var nItem = {}, mItem = {};
    	document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
    	for(var i in x.ss) {
    		nItem = new x.mObj.getItem();
    		nItem.id = 'Note';
    		nItem.label = x.ss[i].label;
    		nItem.value = String(i);
    		nItem.checked = false;
    		// nItem.oncommand = Cb.gMyPrn('erty'+x.id);
    		mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    		this.ss[i].sItemId = mItem.id;
    		mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
    		mItem.setAttribute( 'type','checkbox')
    		mItem.setAttribute( 'checked',false)
    		mItem.setAttribute( 'autocheck',false )
    	} // End for(var i in this.ss)
    	x.mObj.getItem();
    	nItem = x.mObj.getItem();
    	nItem.id = 'Note';
    	this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
    	if (  !Cb.isPref("tagIt.index") ) {
    		Cb.setPrefs("tagIt.index",0);
    	} // End if ( !Cb.isPref("tagIt.index") )
    	var index = Cb.getPrefs("tagIt.index");
    	this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + "\n L=Normal \n M=Clipboard \n R=Context ]";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("tagIt.index"); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090205.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/note2-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    **********************************************************************
    	L = IF text is highlighted:
    		BBCode: [note]Highlighted[/note]
    		HTML: <!--Highlighted-->
    	    OR nothing highlighted,
    		First click = [note] or <!--
    		Second click = [/note] or -->
    	M = Clipboard
    		BBCode: [note]Clipboard[/note]
    		HTML: <!--Clipboard-->
    	   Highlighted text will be replaced
    	R = Context Menu with tag options and submenu for CB Context
    
  337. Notepad

    Code Tab

    /*Code*/

    Initialization Tab

        var link="data:text/html;base64,PFRFWFRBUkVBPjwvVEVYVEFSRUE+DQo8c3R5bGU+aHRtbCB7YmFja2dyb3VuZC1jb2xvcjpibGFjaztvdmVyZmxvdzpoaWRkZW47fXRleHRhcmVhIHtiYWNrZ3JvdW5kOiMzODM4Mzg7b3ZlcmZsb3cteTphdXRvO3dpZHRoOjEwMCU7aGVpZ2h0OjEwMCU7LW1vei1ib3JkZXItcmFkaXVzOjVweDtib3JkZXI6IDVweCBpbnNldCB3aGl0ZTtjb2xvcjogd2hpdGU7fTwvc3R5bGU+";
        var label="Notepad";
        this.leftclick   = function(evt) {
          var head =(document.getElementById('sidebar-title').getAttribute('value') == label);
          if (!head) {
            openWebPanel();
            var sbLoc = document.getElementById('sidebar').contentDocument.location;
            sbLoc.href = link;
            document.getElementById('sidebar-box').hidden = false;
            document.getElementById('sidebar-title').value = label;
            document.getElementById('sidebar-box').collapsed = false;
            document.getElementById('sidebar-splitter').hidden = false;
            return;
          } else {
            toggleSidebar();
          }
        }
    this.sleftclick = function(evt){
    	openUILink(link);
    setAttribute('value') == label;
    }
    this.midclick = function(evt) {
    	gBrowser.selectedTab = gBrowser.addTab(link);
    }
    this.smidclick = function(evt) {
    	gBrowser.addTab(link);
    }
        this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
        this.style.opacity = '1.0';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/notepad-sidebar.html');

    Help Tab

  338. Notepad | Word | Wordpad

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "gShowPopup(this)"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    this.leftclick   = function(evt){
    	this.startProcess('C:/WINDOWS/notepad.exe');
    }
    this.sleftclick  = function(evt){
    	gShowPopup(this);	// Replace with call of your choice
    }
    this.aleftclick  = function(evt){
    	gShowPopup(this);	// Replace with call of your choice
    }
    this.cleftclick  = function(evt){
    	gShowPopup(this);	// Replace with call of your choice
    }
    this.midclick    = function(evt){
    	this.startProcess('c:/program files/microsoft office/office10/winword.exe');
    }
    this.smidclick   = function(evt){
    	gShowPopup(this);	// Replace with call of your choice
    }
    this.amidclick   = function(evt){
    	gShowPopup(this);	// Replace with call of your choice
    }
    this.cmidclick   = function(evt){
    	gShowPopup(this);	// Replace with call of your choice
    }
    this.rightclick  = function(evt){
    	this.startProcess('c:/program files/windows nt/accessories/wordpad.exe');
    }
    this.arightclick = function(evt){
    	gShowPopup(this);	// Replace with call of your choice
    }
    this.crightclick = function(evt){
    	gShowPopup(this);	// Replace with call of your choice
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*------------------ un-comment to show mouseover effects -------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25, SSClockDr, others');
    this.setAttribute('version','20071113.05');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/notepad-word-wordpad.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    //this.tooltipText += ' L: Notepad | M: Word | R: Wordpad';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/%0A%0AThe%20path%20to%20the%20programs%20may%20need%20to%20be%20edited%20to%20suit%20your%20needs.
  339. NslMail

    Code Tab

     

    Initialization Tab

     this.quot = function(evt) {
    var link="http://www.nslmail.com/popup/lookup?title=\""+content.document.title+"\"&url=\""+content.document.location+"\"";
    var label="NslMail";
    var head =(document.getElementById('sidebar-title').getAttribute('value') == label); 
      switch(evt.button) {
    case 2:
    this.showPopup(this);
    return;
    case 0:
       if (!head) {
          openWebPanel();
          var sbLoc = document.getElementById('sidebar').contentDocument.location;
          sbLoc.href = link;
          document.getElementById('sidebar-box').hidden = false;
          document.getElementById('sidebar-title').value = label;
          document.getElementById('sidebar-box').collapsed = false;
          document.getElementById('sidebar-splitter').hidden = false;
          return;
       }
       if (head) {
          document.getElementById('sidebar-title').value = null;
          document.getElementById('sidebar-box').hidden = true;
          document.getElementById('sidebar-box').collapsed = true;
          document.getElementById('sidebar-splitter').hidden = true;
          toggleSidebar();
       }
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    this.tooltipText = 'Nsl Mail';
    this.setAttribute('author','LRodman');
    this.setAttribute('version','1.0alpha');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sidebarbutton-maker-several-example-sidebar-buttons.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    }

    Help Tab

  340. Number of Days to Christmas

    Code Tab

    /*Code*/
    var x = "";
    var today = new Date();
    var christmas = new Date(today.getFullYear(), 11, 25); //Month is 0-11 in JavaScript
    // If Christmas has already passed, calculate next year's Christmas
    if (today.getMonth()==11 && today.getDate()>25) christmas.setFullYear(christmas.getFullYear()+1);
    var one_day = 1000*60*60*24;
    var days_left = Math.ceil((christmas.getTime()-today.getTime())/(one_day));
    if (days_left>59) x = "<strong><table width=100%><tr><td align=center>" + days_left +" days left until Christmas." + "</td></tr></table></strong>";
    else x = "<strong><table width=100%><tr><td align=center> Only " + days_left +" days left until Christmas!" + "</td></tr></table></strong>";
    content.document.body.innerHTML =  x + content.document.body.innerHTML;
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','cblover');
    this.setAttribute('version','20080125.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/number-days-christmas.html');
    this.setAttribute('dependency','');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    	Sat Feb 3 2007 1:15:17 AM GMT-0800 (Pacific Standard Time); 325 days left until Christmas.
    	cblover with indebtedness to the Custom Buttons Forum @ http://custombuttons.phpbbnow.com/
    					and http://www.javascriptkit.com/javatutors/datedifference.shtml
    	Calculates Number of Days to Christmas and boldly prints the result at top center of webpage
    
  341. Number of Days to Christmas Alert

    Code Tab

    /*Code*/
    var x = "";
    var today = new Date();
    var christmas = new Date(today.getFullYear(), 11, 25); //Month is 0-11 in JavaScript
    // If Christmas has already passed, calculate next year's Christmas
    if (today.getMonth()==11 && today.getDate()>25) christmas.setFullYear(christmas.getFullYear()+1);
    var one_day = 1000*60*60*24;
    var days_left = Math.ceil((christmas.getTime()-today.getTime())/(one_day));
    if (days_left>59) x = days_left +" days left until Christmas.";
    else x = "Only " + days_left +" days left until Christmas!";
    alert(x);
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','cblover');
    this.setAttribute('version','20080125.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/number-days-christmas.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    	Sat Feb 3 2007 1:21:19 AM GMT-0800 (Pacific Standard Time); 325 days left until Christmas.
    	cblover with indebtedness to the Custom Buttons Forum @ http://custombuttons.phpbbnow.com/
    					and http://www.javascriptkit.com/javatutors/datedifference.shtml
    	Calculates Number of Days to Christmas and alerts the results
    
  342. Number of lines

    Code Tab

    /*Code*/
    function selectedText() {
      var focusedWindow, winWrapper, aSelection;
      focusedWindow = document.commandDispatcher.focusedWindow;
      winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      aSelection = winWrapper.getSelection().toString();
      if(aSelection.match(/\s/)) 
      aSelection = "\"" + aSelection + "\"";
      return aSelection;
    }
    this.NoOfLines=function()
    {
    	var text=selectedText();
    	alert(text.split("\n").length);
    }
    this.setAttribute("oncommand", "this.NoOfLines();");
    this.tooltipText = this.label;
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','20060912');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/line-count-button.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  343. Object Inspector

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    let Cb2s = cb2String;
    let Cb = custombuttons;
    this.leftclick = function(evt)
    {
      this.inspectObject( true );
    };
    this.midclick = function(evt)
    {
      this.inspectObject( true );
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    if(typeof inspectObject != "function") {
      var ext = "DOM Inspector";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand", "alert('" + err + "');");
      return;
    }
    function selectItems(aText, aItems, aTitle) {
      var promptService =
          Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                    .getService(Components.interfaces.nsIPromptService);
      var selected = {};
      var result = promptService.select(null, aTitle, aText,
                                  aItems.length, aItems, selected);
      if (result) return aItems[selected.value];
      return null;
    }
    this.inspectObject = function(aPrompt) {
      if (aPrompt) {
        var text = "Enter object name (case sensitive)\n" +
                   "For example: document, gBrowser, custombuttons";
        var objStr = "";
        bContinue = Cb.promptBox( "Object Inspector", text, objStr );
        if ( !bContinue[0] ) return;
        objStr = bContinue[1];
        try {
          inspectObject(eval(objStr));
        } catch(ex) {
          //alert(objStr + " is not an object.");
          alert(ex);
        }
        return;
      }
      var objArray = [];
      for (var i in document.defaultView) {
        if (typeof eval(i) == "object") objArray.push(i);
      }
      if (!objArray.length) return;
      objArray.sort(function(a,b) {
        a=a.toLowerCase();
        b=b.toLowerCase();
        if (a < b) return -1;
        if (a > b) return 1;
        return 0;
      })
      var obj = selectItems(objArray.length + " objects found",
                            objArray, "Object Inspector");
      if (obj) eval("inspectObject(" + obj + ")");
    }
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','LouCypher, SCClockDr - Update');
    this.setAttribute('version','20090210.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/functionobject-viewer-group.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    *********************************************************************
    Left - Prompts for an object name to browse in the DOM Inspector
     ***** BEGIN LICENSE BLOCK *****
    Version: MPL 1.1/GPL 2.0/LGPL 2.1
       The contents of this file are subject to the Mozilla Public License Version
     1.1 (the "License"); you may not use this file except in compliance with
     the License. You may obtain a copy of the License at
     http://www.mozilla.org/MPL/
       Software distributed under the License is distributed on an "AS IS" basis,
     WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     for the specific language governing rights and limitations under the
     License.
       The Original Code is Object Inspector for Custom Buttons extension.
       The Initial Developer of the Original Code is LouCypher.
     Portions created by the Initial Developer are Copyright (C) 2007
     the Initial Developer. All Rights Reserved.
       Contributor(s):
     LouCypher <loucypher.moz@gmail.com>
       Alternatively, the contents of this file may be used under the terms of
     either the GNU General Public License Version 2 or later (the "GPL"), or
     the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     in which case the provisions of the GPL or the LGPL are applicable instead
     of those above. If you wish to allow use of your version of this file only
     under the terms of either the GPL or the LGPL, and not to allow others to
     use your version of this file under the terms of the MPL, indicate your
     decision by deleting the provisions above and replace them with the notice
     and other provisions required by the GPL or the LGPL. If you do not delete
     the provisions above, a recipient may use your version of this file under
     the terms of any one of the MPL, the GPL or the LGPL.
     ***** END LICENSE BLOCK ***** */
       Last updated:  2007-04-27 - LouCypher
                      2009-02-10 - SCClockDr
    
  344. Object Inspector

    Code Tab

    /* ***** BEGIN LICENSE BLOCK *****
     * Version: MPL 1.1/GPL 2.0/LGPL 2.1
     *
     * The contents of this file are subject to the Mozilla Public License Version
     * 1.1 (the "License"); you may not use this file except in compliance with
     * the License. You may obtain a copy of the License at
     * http://www.mozilla.org/MPL/
     *
     * Software distributed under the License is distributed on an "AS IS" basis,
     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     * for the specific language governing rights and limitations under the
     * License.
     *
     * The Original Code is Object Inspector for Custom Buttons extension.
     *
     * The Initial Developer of the Original Code is LouCypher.
     * Portions created by the Initial Developer are Copyright (C) 2007
     * the Initial Developer. All Rights Reserved.
     *
     * Contributor(s):
     *  LouCypher <loucypher.moz@gmail.com>
     *
     * Alternatively, the contents of this file may be used under the terms of
     * either the GNU General Public License Version 2 or later (the "GPL"), or
     * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     * in which case the provisions of the GPL or the LGPL are applicable instead
     * of those above. If you wish to allow use of your version of this file only
     * under the terms of either the GPL or the LGPL, and not to allow others to
     * use your version of this file under the terms of the MPL, indicate your
     * decision by deleting the provisions above and replace them with the notice
     * and other provisions required by the GPL or the LGPL. If you do not delete
     * the provisions above, a recipient may use your version of this file under
     * the terms of any one of the MPL, the GPL or the LGPL.
     *
     * ***** END LICENSE BLOCK ***** */
    // Last updated: 2007-04-27
    this.inspectObject();
    

    Initialization Tab

    if(typeof inspectObject != "function") {
      var ext = "DOM Inspector";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand", "alert('" + err + "');");
      return;
    }
    function selectItems(aText, aItems, aTitle) {
      var promptService =
          Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                    .getService(Components.interfaces.nsIPromptService);
      var selected = {};
      var result = promptService.select(null, aTitle, aText,
                                  aItems.length, aItems, selected);
      if (result) return aItems[selected.value];
      return;
    }
    this.inspectObject = function(aPrompt) {
      if (aPrompt) {
        var text = "Enter object name (case sensitive)\n" +
                   "For example: document, gBrowser, custombuttons";
        var objStr = prompt(text, "", "Object Inspector");
        if (!objStr) return;
        try {
          inspectObject(eval(objStr));
        } catch(ex) {
          //alert(objStr + " is not an object.");
          alert(ex);
        }
        return;
      }
      var objArray = [];
      for (var i in document.defaultView) {
        if (typeof eval(i) == "object") objArray.push(i);
      }
      if (!objArray.length) return;
      objArray.sort(function(a,b) {
        a=a.toLowerCase();
        b=b.toLowerCase();
        if (a < b) return -1;
        if (a > b) return 1;
        return 0;
      })
      var obj = selectItems(objArray.length + " objects found",
                            objArray, "Object Inspector");
      if (obj) eval("inspectObject(" + obj + ")");
    }
    this.setAttribute("onclick", "if (event.button == 1) " +
                                 "this.inspectObject(true);");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/object-inspector.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  345. Old Button Mover v15

    Code Tab

    /*CODE*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    let Cb = custombuttons;
    let prefId = Cb.getConst( "CB_BRANCH_ID" ) + "Cb-button" + Cb.getNumber( this.id );
    this.userName = "";
    if ( Cb.isPref( prefId ) ) {
      this.userName = " -" + Cb.getPref( prefId );
    } // End if ( Cb.isPref( prefId ) )
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('...')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.oValues = null;
    this.tt = this.tooltipText;
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      if ( !this.checked ) {
        if ( !this.userName ) this.userName = this.setUserName();
        this.oValues = this.getValues();
        this.checked = true;
        this.tooltipText = this.tt + "\n\nReady to Paste into the new Post!"
      } // End if ( !this.checked )
      else {
        this.cleftclick(evt);
      } // End else ( !this.checked )
    };
    this.sleftclick = function(evt)
    {
      content.document.getElementById( "edit-submit" ).click();
    };
    this.cleftclick = function(evt)
    {
      if ( this.checked  && ( content.document.getElementById( "edit-title" ).value === "" ) ) {
        this.setValues( this.oValues );
        this.checked = false;
        this.oValues = null;
        this.tooltipText = this.tt + "\n\nReady for next Post!"
      } // End if ( !this.checked )
    };
    this.smidclick = function(evt)
    {
      this.cleftclick(evt);
    };
    this.crightclick = function(evt)
    {
      this.checked = false;
      this.oValues = null;
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    this.alertBox = function()
    {
      Cb.alertBox( this.label + " Source Data warning", "\tOld Button post Source data not present.\nFirst gather the source data from custombuttons.com." );
    }
    this.getValues = function()
    {
      let oEdit = {};
      let temp = [], temp1 = [];
      let title = content.document.getElementById( "edit-title" ).value;
      oEdit.title       = content.document.getElementById( "edit-title" ).value;
      let rExp = / x$| X$| -\S*$/i;
      if ( !rExp.test( title ) ) {
        content.document.getElementById( "edit-title" ).value += this.userName;
      }  // End if ( !rExp.test( title ) )
      else {
        Cb.alertSlide( "Duplication of " + title + " a possibility", title + " indicates it was already moved. Proceed with caution!" )
        oEdit.title = oEdit.title.replace( rExp, "" )
      } // End else
      oEdit.body      = "";
      if ( content.document.getElementById( "edit-teaser-js" ) ) {
        oEdit.body      = content.document.getElementById( "edit-teaser-js" ).value;
      } // End if ( content.document.getElementById( "edit-teaser-js" ) )edit-teaser-js
      oEdit.body        += content.document.getElementById( "edit-body" ).value;
      temp = oEdit.body.replace( /\[size=\d+]|\[\/size]/gm, "" ).replace( /\[\/\*:m\]|:u/igm, "" ).replace( /(:cb\d{1,3}.:)|(:cb2:)|(:cb:)|(:ff\d+:)|(:flock:)|(:mf:)|(:tb\d+:)/igm, "" );
      let aButLink = /(custombutton\:\/\/.*custombutton%).*\[\/cb]/im( oEdit.body ) || ["",""];
      if ( aButLink[1] ) aButLink[1] += "3E"
      oEdit.body = ( temp )?  temp.replace(/\[cb=.*\/cb]/g, "" ) : oEdit.body;
      temp = oEdit.body.replace( /\[note].*\[\/note]/im, "" );
      oEdit.tbuttons0   = aButLink[1];
      let nTemp = oEdit.body.toLowerCase().indexOf("changelog]")
      let nTemp1 =  0;
      if ( nTemp === -1 ) {
        nTemp = oEdit.body.toLowerCase().indexOf("change log]");
        if ( nTemp !== -1 ) {
          nTemp += 11;
          nTemp1 =  oEdit.body.substr(nTemp).indexOf("[/toggle]") + nTemp;
        }
      }
      else {
        nTemp += 10;
        nTemp1 =  oEdit.body.substr(nTemp).indexOf("[/toggle]") + nTemp;
      }
      if ( nTemp !== -1 ) {
        //oEdit.newlog = oEdit.body.substring( nTemp ,nTemp1 );
        oEdit.body = oEdit.body.substring( 0, nTemp ) + oEdit.body.substring( nTemp1 );
      }
      else {
        //oEdit.newlog = "";
      }
      rExp = /\[note].*\[\/note]/im;
      while (  rExp.test( oEdit.body ) ) {
        oEdit.body = oEdit.body.replace( rExp, "" );
      } // End while(  .test( title ) )
      oEdit.body = oEdit.body.replace( /\[toggle\=KnownIssues]None\[\/toggle]/im, "" ).replace( /\[toggle\=Change.*\[\/toggle]/im, "" );
      oEdit.log         = "Moved Post"; // "content.document.getElementById( "edit-log" ).value;
      oEdit.name        = content.document.getElementById( "edit-name" ).value;
      return oEdit;
    };
    this.setValues = function( oEdit )
    {
      content.document.getElementById( "edit-title" ).value = oEdit.title;
      content.document.getElementById( "edit-body" ).value = oEdit.body;
      content.document.getElementById( "edit-field-tbuttons-0-value-field-tbutton-0-value" ).value = oEdit.tbuttons0;
      //content.document.getElementById( "edit-field-newlog-0-value" ).value = this.doDate() + oEdit.newlog;
      content.document.getElementById( "edit-log" ).value = oEdit.log;
      let aOps = content.document.getElementById( "edit-taxonomy-2" ).getElementsByTagName("option");
      for (let i = 0; i < aOps.length; i++) {
        switch (aOps[i].value)
        {
        case "11826": // Minefield
        case "41":    // Firefox 3
        case "40":    // Firefox 2
        case "39":    // Firefox 1.5
        case "42":    // Flock 2
        //case "48":    // Thunderbird 3
        //case "49":    // Thunderbird 2
        //case "11862": // Calendar 1
          aOps[i].selected = true;
          break;
        default :
          aOps[i].selected = false;
          break;
        } // End switch ( i )
      } // End for
      aOps = content.document.getElementById( "edit-taxonomy-11" ).getElementsByTagName("option");
      for (let i = 0; i < aOps.length; i++) {
        switch (aOps[i].value)
        {
        case "17797":   // Other
          aOps[i].selected = true;
          break;
        default :
          aOps[i].selected = false;
          break;
        } // End switch ( i )
      } // End for
      content.document.getElementById( "edit-name" ).value = oEdit.name;
      content.document.getElementById( "edit-taxonomy-tags-8" ).value = oEdit.name;
    };
    /*----------------------------------------------------
      Function:  this.doDate( )
      Args:	None
      Returns: Version String
      Calls:	Date()
        d.getMonth()	0 based
        d.getDate()	1 based
        d.getFullYear()	1 based
    ----------------------------------------------------*/
    this.doDate = function( ) {
      var d = new Date();
            let _y = String( d.getFullYear() );
            let _m = ( d.getMonth() < 9 )? "0" + String( d.getMonth() + 1 ) : String( d.getMonth() + 1 );
            let _d = ( d.getDate() <= 9 )? "0" + String( d.getDate() ) : String( d.getDate() );
      return  "Version " + _y + _m + _d +'.01\n[list][*]Moved Post[/list]\n' ;
    }; // End function this.doDate()
    /**  setUserName(  )
     Author:    George Dunham aka: SCClockDr
     Scope:     private
     Args:      oBtn -
     *
     Returns:   sRes
     Called by: 1. Click Functions
     Purpose:   1. Set UserName preference and button's userName
     TODO:      1.
    **/
    this.setUserName = function() //{{{
    {
      let Cb = custombuttons;
      // let prefId = Cb.getConst( "CB_BRANCH_ID" ) + "Cb-button" + Cb.getNumber( this.id );
      if ( !Cb.isPref( prefId ) ) {
        let aRes = Cb.promptBox( this.label + " User Name Request", "Please enter your Custom Buttons² UserName.", "" );
        if ( aRes[0] ) {
          Cb.setPref( prefId, aRes[1].toUpperCase());
        } // End if ( aRes[0] )
        else {
          Cb.alertBox( "Required Info not set!", this.label + " button is disabled until the required Data is set!" )
          this.disabled(true);
          return "";
        } // End else ( aRes[0] )
      } // End if ( Cb.isPref("CustomButtons2@cbtnext.org.cb-button"+Cb.getNum( this.id ) ) )
      return " -" + Cb.getPref( prefId );
    }; //}}} End Method setUserName( oBtn )
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','v15.20090228');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/old-button-mover-v7.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText = this.tt + "\n\nReady for next Post!"
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

      How to use this button:
       1. Open the old button for edit. ( http://custombuttons2.com )
       2. Open create new button post.  ( http://cbbeta.alipaz.net )
       3. Go back to the old post left click the button.
       4. Go to the new post:
          a. Middle click or Ctrl+Left click the button.
          b. Fields should populate.
       5. Add as needed:
          a. Additional buttons.
          b. Add additional images.
          c. Behaviors.
             1.) Get them from the old Post if need be.
       6. Check accuracy.
          a. Fix up where necessary.
       7. Save the new Button.
       8. Save the Old post.
       9. Done
    NOTES:
          First Button field should be populated.
          Additional fields will be manual entry.
          Behavior fields NOT populated.
            If the title field of the source page already has an entry for
          any username " -anyUserName" as the last thing in the title then
          an alert slide will warn of the possipility you might duplicate
          the post in the new forum. Proceed with caution Please!
           Left Click - Copy the old content.
      Ctrl+Left Click - Paste content to the new database.
      Shift+Middle Click - Paste content to the new database.
      Ctrl+Right Click - Clear Gathered Data and reset checked to false.
    
  346. On/Off Line Proxy Toggle

    Code Tab

    BrowserOffline.toggleOfflineStatus();

    Initialization Tab

    const offimg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAMCAYAAAELwp3eAAAAKnRFWHRDcmVhdGlvbiBUaW1lAIyOIDIyIDExIDIwMDQgMDM6MjE6MTQgKzA5MDBZZECTAAAAB3RJTUUH1AsWBgwQ8lbuEQAAAAlwSFlzAAAK8AAACvABQqw0mAAAAARnQU1BAACxjwv8YQUAAAMmSURBVHjahVR9SBNhGH/vvNtum80KRJFJWtFCSUSJJCgyEUTtw4+EDdGaFkphIQn9k2AS/REIBZYQUX/kR1iwIepKlNSRhDg/AisDUVmaqbT8uG137+563rXJtYReeI/f87vn+3nuEIJjLS7eRS7BNHkcNxrXY6Ki1k4nJCQg5aGupqcfOhoXdylKrT5M9ZjNW7Is09lFRVxzS0vpybS0Z+tu95aEsYCCjqmQKWBdABAr4fVr+WVBQStxKVmtcr/FsszktrUZnHr9CkNR+4niyugoujswcAwpXKj6KyvX5fFx+UVh4Y0Q76ipwV/u35c6CgurQxzztb7eA8kFBIPBwG2MjCAR4+18VLIsxev1EarU1AczyclNgfKUtTZnZ6doWDZryOXqfz41NUW4F/n513mMf12x23tA/IHCT7CVOoVMhVq74+k2m1tJPX0WixdElnBvysuthOsymXhlVgxpHQF7o6NpeX6eQPlxTs7lBoejS5YkRLhTeXmaPo77TlN/7JiDBw4EhsppNKx3eRkhjFG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rhIsV+4GNfbx9r7hqRWAQhGlWxR6+Nxk5WGQ1HqVABCUopTjNlFGVZPgsgIoKRqyP+T+fuuodNRNEo8e44AJ70ghptBZrlBKCma5RUSQKeJz12dneQUjYTrf5c/Vw/FBqNsASDVwZpc9ocT3lJbbQVEP5E0kgKsqCBre2tbZ1ZyeCnp734YPEu0HnsGJgYIHEjgfvbpbu/O260+eJpr9e2bOvMudKJ8cbUdK26L/c/aamfur9chYbMmwwicEKjozV/7Nh4u0HieoKcm6OYL+YJMCWr8mU4Fu7066iYL+bWv6+/MMrsVcvV/b1ve+SWcs0d+QUbZTjYPsCKWADvMaTbY+0/fDXar92p/KlkjWfKhZWC2Xy3+f8/QwuzgWBdjA0oQAMS8E4L/ge2mvjqkoP/hQAAAABJRU5ErkJggg==';
    this.pref='browser.offline';
    this.ptype='network.proxy.type';
    this.setState=function(){
    	var state=this.PS.getBoolPref(this.pref);
    	var pstate=this.PS.getIntPref(this.ptype);
    	if (pstate==0)
    	{
    		if (state==true){
    			this.image=offimg;
    			this.checked=true;
    		} else {
    			this.image=onimg;
    			this.checked=false;
    		}
    	} else {
    		if (state==true){
    			this.image=poffimg;
    			this.checked=true;
    		} else {
    			this.image=ponimg;
    			this.checked=false;
    		}
    	}
    }
    this.toggleProxy=function(){
    	var pstate=this.PS.getIntPref(this.ptype);
    	if (pstate==0)
    		this.PS.setIntPref(this.ptype,1);
    	else
    		this.PS.setIntPref(this.ptype,0);
    }
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.PS.addObserver(this.ptype,this.ob,false);
    this.setState();
    this.setAttribute("onclick","if (event.button==1) this.toggleProxy();");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/onlineoffline-and-toggle-proxy-button-combined.html');

    Help Tab

  347. Open a Create Button Post Page

    Code Tab

    /*Code*/
    //This button was auto-created with the Make A Bookmark Button

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var link='http://cbbeta.alipaz.net/node/add/buttons-post/11813';
    var Msg = createMsg(this.label);
    this.bottomPanel = function(url, contextmenu) {
      var panelID = 'bottom-panel';
      var gPanel = document.getElementById(panelID);
      if(gPanel) {
        if(gPanel.firstChild.getAttribute('src').indexOf(url) == -1) {
          gPanel.firstChild.setAttribute('src', url);
          if(contextmenu) gPanel.setAttribute('contextmenu', contextmenu);
          else gPanel.removeAttribute('contextmenu');
        } else {
          gPanel.parentNode.removeChild(gPanel.previousSibling);
          gPanel.parentNode.removeChild(gPanel);
        }
      } else {
        var tbb = document.createElement('toolbarbutton');
            tbb.className = 'tabs-closebutton';
            tbb.style.cursor = 'pointer';
            tbb.setAttribute('oncommand',
                'this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); ' +
                'this.parentNode.parentNode.removeChild(this.parentNode)');
        var spr = document.createElement('spacer');
            spr.setAttribute('flex', 1);
        var spl = document.createElement('splitter');
            spl.height = '28px';
            spl.appendChild(spr);
            spl.appendChild(tbb);
        var ifr = document.createElement('iframe');
            ifr.setAttribute('flex', 1);
            ifr.setAttribute('src', url);
        var box = document.createElement('box');
            box.id = panelID;
            box.height = '300px';
            box.appendChild(ifr);
        if(contextmenu) box.setAttribute('contextmenu', contextmenu);
        gBrowser.parentNode.appendChild(spl);
        gBrowser.parentNode.appendChild(box);
      }
    }
    this.leftclick = function(evt) {
      if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI(link);else gBrowser.selectedTab=gBrowser.addTab(link);
    };
    this.midclick = function(evt) {
      if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI(link);else gBrowser.selectedTab=gBrowser.addTab(link);
    }; this.cleftclick = function(evt) { this.midclick(evt); }
    this.rightclick = function(evt) {
      loadURI(link);
    };
    this.leftDclick = function(evt) {
      if(content.document.location.href==''||content.document.location.href=='about:blank')loadURI(link);else gBrowser.addTab(link);
    };
      this.hover = function() {
        var build=window.navigator.userAgent;
        if (build.match('Firefox/2.0.')) var br = ' | ';
        if (!build.match('Firefox/2.0.')) var br = '\n\t';
        this.tooltipText = this.label+br+'L: New Tab (F)'+br+'D: New Tab (B)'+br+'M: New Tab (F)'+br+'R: Current Tab';
      }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); 
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'this.hover(); if (custombuttons) custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'if (custombuttons) custombuttons.ButtonDim(event);' );
    this.setAttribute('author','Make a Bookmark Button');
    this.setAttribute('version','20090219.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/old-button-mover-v7.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

      This <label> button loads page:
    http://cbbeta.alipaz.net/node/add/button-post/11813
     Titled:
    Create Button Post | Custom Buttons²
     Button Behavior:
        L: New Tab (F)
        D: New Tab (B)
        M: New Tab (F)
        R: Current Tab;
    
  348. open chrome editor

    Code Tab

    Local_Install.openChromeEditor();

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/userchromejs-edit-button.html');

    Help Tab

  349. Open File, Extension, Theme & Download Link All in One

    Code Tab

    /*代码*/
    this.value="lget_newDownloadMenu";
    document.getElementById(event.target.value).click();

    Initialization Tab

    /*初始化代码*/
    var srcUrl,MItem,mPop;
    var Img1="data:image/jpeg;base64,/9j/4AAQSkZJRgABAAEAYABgAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/2wCEAAUFBQgFCA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N1hnbV6naCzgQnbHGNxJOEUZJ6k8ck9z1rxbW2PUuRR6dawv5kcMSOerLGgPPuBmr5m1Zt29SbJapGpUjP/9k=";
    /*
    To add a submenu create a new array using the array sub as an example (rename it),
    then link to the submenu by adding a menuitem in the apps array which has the name
    of the submenu array as it's third array item. 
    The menuitem needs to have a 1 in it's first array item (this indicates
    it has a submenu).  You may create as many submenus as you like and
    can additionally create submenus within submenus.
    */
    //------Main Menu items--------
    apps=new Array;
    // here is where I link the prior named array, see the name sub?
    // I also insert a 1 instead of 0, this indicates it has a submenu
    apps.push([0,'Open File','menu_openFile',Img1]);
    apps.push([0,'Install Extension','installExtensionMenu',Img2]);
    apps.push([0,'Install Theme','installThemeMenu',Img3]);
    //------FUNCTIONS FOR ADDING MENU ITEMS------
    //------menu items-------
    MItem=function(apps,value){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',apps[value] [1]);
      mItem.value = apps[value] [2];
      mItem.tooltipText = 'Cheggit';
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',apps[value] [3]);
      return mItem;
    }
    nItem=function(label,value){
      var mItem=document.createElement('menuitem'); 
      mPop=document.createElement('menupopup');
      mPop=createMenu(mPop,apps);
      mItem.value = value;
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',document.getElementById("page-proxy-favicon").src);
      return mItem;
    }
    mPop=document.createElement('menupopup');
    mPop=createMenu(mPop,apps);
    function createMenu(menu,aray) {
      for (var i=0;i<aray.length;i++) {
        if(aray[i] [0]==0) {
          if (aray[i] [1] =='separator') {
            menu.appendChild(document.createElement('menuseparator'));
          }
          else {
            menu.appendChild(MItem(aray,i));
          }
        }
        else {
          var sMenu=document.createElement('menu');
          sMenu.setAttribute('label',aray[i] [1]);
          sMenu.setAttribute('class','menuitem-iconic');
          sMenu.setAttribute('image',aray[i] [3]);
          var subMenu=document.createElement('menupopup');
          subMenu.setAttribute('orient','horizontal');
          subMenu=createMenu(subMenu,aray[i] [2]);
          sMenu.appendChild(subMenu);
          menu.appendChild(sMenu);
          //alert(subMenu.lastChild());
        }
      }	
      return menu;
    }
    //------DEFINES ACTIONS FOR SITES------
    this.appendChild(mPop);
    //this.type = "menu"; this.setAttribute("class", "menu-iconic");// MAKES THIS A 'BUTTON MENU'
    this.type = "menu-button"; // MAKES THIS A 'MENU BUTTON'
    this.value=-1;
    this.tooltipText = "Open Download Link";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/open-file-extension-theme-download-link-all-one.html');

    Help Tab

    click button directly to open a link to download, and click submenu you can:
    1. Open File
    2. Open Extension
    3. Open Theme
  350. Open File, Install Extension & Install Theme All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    document.getElementById('menu_openFile').click();
    }
    this.midclick = function(e) {
    document.getElementById('installExtensionMenu').click();
    }
    this.rightclick = function(e) {
    document.getElementById('installThemeMenu').click();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Open File|M: Install Extension|R: Install Theme";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/open-file-install-extension-install-theme-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    null
  351. Open files and folders

    Code Tab

    /*Code*/

    Initialization Tab

    var apps=new Array;
    var folderImg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6AAAdTAAAOpgAAA6lwAAF2+XqZnUAAADe0lEQVR4nABBAL7/AenZr0TJkVG7GS448f368AAAAAMADQ0KANbGyw9htT/C8+XAP79zAQABDgAABQICABEN/gDEygAAyhiOAMCviAACiOVIX+DuoBn/gRoZ+BkYvgCpP0AswKCVcIDhur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g8AAAAAElFTkSuQmCC';
    var fileImg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACXklEQVQ4jZWQa0iTURjHj3v3qptm4krNZEMhDQkzoyzURNSylRNmdpUFQZrdMCsoZoWmll8q8oNCggSa1FpWOi+gTd6aYbO2dRNr0cUEKeiCycxp/84ZzA/RJj7w4/A85/x/h3NIy91u7c22HmG+sBwAQpr0HcLk+CvMp9h5lpMuXMSThuY7AhvOOEe8klNUMgsrlqOCIFLbcMMlmJ76CKPRiH7TY/T2PoDJZMLw8DCcdM74V8ByVCAjNVevuQRTjrdeqdfdn4UVy7kEZ6qvCO53mc2DsFhtMHR249btVjS16PDooR7PLV14bxdgoyvrBwYtKCo5/TRMERNNSrVVLoHju8XFlxETOtsbsVOlxr2szbDm7UadMheV5ceRlp6Fru0FeJKaifqkVMQtjT5HstV7hJ+jvbM/PPTGDmXuNrzW7MPUgBUzzXpM7j+MqvjV+HC2AjMdRkyX12AiOQOnIqNAslQ7tOnKPMFNYkqmbf2GDPwqqwBe2oG2HuDoSeDICeDFO6DfCpRVYmLVOlSLfUHopf+lL2HNM2jPAxcuA8XHgIOlgL6D9pfgTNuEviAZtviIvnkUHJAElv9IWAtkq/BnYw6wVQ3kF8BJ328LV6CS98cyjmv3KIgQiZbrQkI/fY2Nx+iKRIzFJWAsdiWGFDG4LlmAfDHvCBCJ9noUMJJ5v10GWcRv85IoGEMjYQgOQ6NvAIrFHOQirpYQstirgJEk9tPUSYI/d0lD0MIH4pCYH4/kuIs0LKeI5xQw5ByXUsj7t2o4vi+c4wppUMbCbG/OsBtaPhQpxZ/Cued/AV+sp5kbU6/OAAAAAElFTkSuQmCC';
    //------menu items--------
    apps.push(['Projects',folderImg,'c:/windows/explorer.exe','D:/me_projects']);
    apps.push(['Documentation',folderImg,'c:/windows/explorer.exe','D:/Documentation']);
    apps.push(['Scripts',folderImg,'c:/windows/explorer.exe','D:/scripts template']);
    apps.push(['PLC',folderImg,'c:/windows/explorer.exe','D:/PLC']);
    apps.push(['Softwares',folderImg,'c:/windows/explorer.exe','D:/softwares']);
    apps.push(['Loadlist',folderImg,'c:/windows/explorer.exe','D:/PLC/LoadList']);
    apps.push(['DBZ',folderImg,'c:/windows/explorer.exe','D:/Inu Yasha/namek sagag']);
    apps.push(['Images',folderImg,'c:/windows/explorer.exe','D:/PLC/images/skin']);
    apps.push('separator');
    apps.push(['tnsnames.ora',fileImg,'C:/Program Files/EditPlus 2/editplus.exe','C:/oracle/ora92/network/ADMIN/tnsnames.ora']);
    apps.push(['Coll RT',fileImg,'C:/Program Files/EditPlus 2/editplus.exe','D:/me_projects/Collection RTs/coll_rts.pl']);
    apps.push(['Patch Life Cycle',fileImg,'C:/Program Files/EditPlus 2/editplus.exe','D:/PLC/PatchLifeCycle.java']);
    apps.push(['Custom Buttons',fileImg,'C:/Program Files/EditPlus 2/editplus.exe','D:/cool firefox extensions for me/Custom buttons/custom buttons2.html']);
    apps.push(['Run Tom cat',fileImg,'c:/windows/explorer.exe','D:/jakarta-tomcat-5.0.29/bin/startup.bat']);
    apps.push(['Automation-PLC',fileImg,'C:/Program Files/Java/jdk1.5.0_01/bin/java.exe','D:/PLC/AutomationWorkbench']);
    apps.push(['AddressBook',fileImg,'c:/perl/bin/perl.exe','D:/PLC/phoneBook/AddressBook.pl']);
    apps.push(['Add/Remove Prgs',fileImg,'c:/windows/system32/control.exe','C:/WINDOWS/system32/Appwiz.cpl']);
    apps.push(['Date and Time',fileImg,'C:/WINDOWS/system32/control.exe','C:/WINDOWS/system32/timedate.cpl']);
    //------/menu items-------
    var nMItem=function(label,img,path,args,obj){
      var m=document.createElement('menuitem');
      m.setAttribute('label',label);
      m.f=obj.startProcess.bind(obj);
      m.setAttribute('oncommand','this.f("'+path+'","'+args+'")');
      m.setAttribute('class','menuitem-iconic');
      m.setAttribute('image',img);
      m.tooltipText = args;
      return m;
    }
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\'));
     args=args.replace(/\//g,'\\');
    // file.launch();
     process.init(file);
     process.run(false,[args],1); 
    }
    this.orient="horizontal";
    var mP=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mP.appendChild(document.createElement('menuseparator'));
     }else{
      if (!apps[i] [3]) apps[i] [3]='';
      mP.appendChild(nMItem(apps[i] [0],apps[i] [1],apps[i] [2],apps[i] [3],this));
     }
    }
    this.appendChild(mP);
    this.type='menu';
    alert('Done')
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/open-files-and-folders.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    null
  352. Open Google Notebook

    Code Tab

    /*Code*/

    Initialization Tab

    this.setAttribute('onmousedown','GNOTES_overlay.StatusCallback(event)');
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080306.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-notebook.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*,Google Notebook Extension');			// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    Opens%20the%20Google%20Notebook%20Window
  353. Open In Sidebar

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    /*------------------------- Button Code Block Start --------------------------*/
    this.leftclick = function(e) {
      if (document.getElementById('sidebar-title').getAttribute('value') == gBrowser.selectedTab.label) {
        toggleSidebar();
      }
      else if (/\.xul$/.test(gBrowser.currentURI.spec)) {
        toggleSidebar('viewWebPanelsSidebar', true);
        document.getElementById('sidebar').setAttribute('src', gBrowser.currentURI.spec);
        document.getElementById('sidebar-title').setAttribute('value', gBrowser.selectedTab.label);
      }
      else {
        openWebPanel(gBrowser.selectedTab.label, gBrowser.currentURI.spec);
      }
    }
    this.rightclick = function(e) {
      if (document.getElementById('sidebar-box').hidden) {
        return gShowPopup(this);
      }
      var sidebarDoc = document.getElementById('sidebar').contentDocument;
      var sidebarHref = sidebarDoc.location.href;
      if(sidebarDoc.getElementById('web-panels-browser')) {
        var panelDoc = sidebarDoc.getElementById('web-panels-browser').contentDocument;
        var panelHref = panelDoc.location.href;
      }
      if(sidebarHref == document.getElementById('viewWebPanelsSidebar').getAttribute("sidebarurl"))
        gBrowser.loadURI(panelHref);
      else
        gBrowser.loadURI(sidebarHref);
    }
    this.cleftclick = function(e) {
      toOpenWindowByType("_x_y_z_", gBrowser.currentURI.spec, "width=640,height=480,chrome,resizable,centerscreen");
    }
    this.crightclick = function(e) {
      if (document.getElementById('sidebar-box').hidden) {
        return gShowPopup(this);
      }
      var sidebarDoc = document.getElementById('sidebar').contentDocument;
      var sidebarHref = sidebarDoc.location.href;
      toOpenWindowByType("_x_y_z_", sidebarHref, "width=640,height=480,chrome,resizable,centerscreen");
    }
    this.setAttribute('onclick', 'gQuot(event, this);');
    /*-------------------------- Button Code Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','ithinc');
    this.setAttribute('version','20080316.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/open-sidebar.html');
    this.setAttribute('dependency','FF2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  354. Open Location

    Code Tab

    openDialog("chrome://browser/content/openLocation.xul", "_blank", "chrome,dependent,resizable,dialog=no,titlebar", window);

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/open-location.html');

    Help Tab

  355. Opera

    Code Tab

    /*CODE*/
    var page = gBrowser.currentURI;
    var browser = "/usr/bin/opera";
    var file =  Components.classes["@mozilla.org/file/local;1"]
                          .createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath(browser);
    var process = Components.classes["@mozilla.org/process/util;1"]
                            .createInstance(Components.interfaces.nsIProcess);
    process.init(file);
    process.run(false, [page.spec], 1);
    return true;
    

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-buttons-linux.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button launches the current page in Opera
    It works on the linux operating system.
  356. Option, Advance Option & Configuration Mania All in One

    Code Tab

    /*代码*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    document.getElementById('menu_preferences').click();
    }
    this.rightclick = function(e) {
    document.getElementById('confmania').click();
    }
    this.midclick = function(e) {
    document.getElementById('gcToolsItem').click();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Option|M: guixonfig|R: Configuration Mania";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20100101.01');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/option-advance-option-configuration-mania-all-one.html');

    Help Tab

  357. Option, Advance Option & Tab Mix Plus Option All in One

    Code Tab

    /*代码*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    document.getElementById('menu_preferences').click();
    }
    this.rightclick = function(e) {
    document.getElementById('tabmix-menu').click();
    }
    this.midclick = function(e) {
    document.getElementById('gcToolsItem').click();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Option|M: guixonfig|R: Tab Mix Plus Option";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20091230.01');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/option-advance-option-tab-mix-plus-option-all-one.html');

    Help Tab

  358. Options

    Code Tab

    /*Code*/
    this.openPrefs();

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    let Cb = custombuttons;
    this.properties = {
      en_US:{
        MenuItemsT2:{
          mItem0: "General",
          mItem1: "Display",
          mItem2: "Compose",
          mItem3: "Privacy",
          mItem4: "Attachments",
          mItem5: "Advanced"
        },
        MenuItemsFl:{
          mItem0: "Main",
          mItem1: "Tabs",
          mItem2: "Content",
          mItem3: "Feeds",
          mItem4: "Searching",
          mItem5: "Privacy",
          mItem6: "Security",
          mItem7: "Advanced",
          mItem8: "Blogplus"
       },
        MenuItems15:{
          mItem0: "General",
          mItem1: "Privacy",
          mItem2: "Content",
          mItem3: "Tabs",
          mItem4: "Downloads",
          mItem5: "Advanced"
       },
        MenuItems20:{
          mItem0: "Main",
          mItem1: "Tabs",
          mItem2: "Content",
          mItem3: "Feeds",
          mItem4: "Privacy",
          mItem5: "Security",
          mItem6: "Advanced"
       },
        MenuItems30:{
          mItem0: "Main",
          mItem1: "Tabs",
          mItem2: "Content",
          mItem3: "Applications",
          mItem4: "Privacy",
          mItem5: "Security",
          mItem6: "Advanced"
       },
        zLast:""
      },
      zLast:"Last no Comma"
    };
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    this.Cb = custombuttons;
    this.oItems = [];
    let itemsId = "";
    var brand = document.getElementById("bundle_brand");
    var appName = brand.getString("brandShortName");
    switch (this.Cb.gAppVersion().substring(0,1))
    {
    case "1":
      if (appName == "Flock" ) {
        itemsId = "MenuItemsFl";
      }
      else if (appName == "Thunderbird") {
        itemsId = "MenuItemsT2";
      }
      else {
        itemsId = "MenuItems15";
      }
      break;
    case "2":
      if (appName == "Thunderbird"){
        itemsId = "MenuItemsT2";
      }
      else {
        itemsId = "MenuItems20";
      }
      break;
    default :
      if (appName == "Thunderbird"){
        itemsId = "MenuItemsT2";
      }
      else {
        itemsId = "MenuItems30";
      }
      break;
    } // End switch (this.Cb.gAppVersion().substring(0,1))
    this.oItems = this.Cb.getLocalString( this, itemsId);
    this.mObj = this.Cb.getCbContextObj(this);
    this.mtFunc = function(){};
    this.init = function (oBtn)
    {
      oBtn.mObj.listener = function(oBtn){oBtn.mtFunc();};
      oBtn.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in oBtn.oItems) {
        nItem = new oBtn.mObj.getItem();
        nItem.id = oBtn.oItems[i];
        nItem.label = oBtn.oItems[i];
        if (oBtn.oItems[i] == "Blogplus") {
          nItem.value = "blogplusspane";
        }
        else if (oBtn.oItems[i] == "Attachments") {
          nItem.value = "paneDownloads";
        }
        else {
          nItem.value = "pane" + oBtn.oItems[i];
        }
        nItem.checked = false;
        mItem = oBtn.mObj.insertBefore( nItem , oBtn.mObj.oMenu.lastChild);
        // oBtn.oItems[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.openPrefs(event);' )  // this
        // mItem.setAttribute( 'type','checkbox')
        // mItem.setAttribute( 'checked',false)
        // mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.oItems)
      oBtn.mObj.getItem();
      nItem = oBtn.mObj.getItem();
      nItem.id = 'Note';
      this.separator = oBtn.mObj.insertBefore( nItem , oBtn.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.openPrefs = function(aEvent) {
      if(aEvent) var paneID = aEvent.target.value;
      var features = "chrome,titlebar,toolbar,centerscreen,minimizable,resizable";
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
        .getService(Components.interfaces.nsIWindowMediator);
      var win = wm.getMostRecentWindow("Browser:Preferences") || wm.getMostRecentWindow("Mail:Preferences");
      if(win) {
        win.focus();
        if(paneID) {
          var pane = win.document.getElementById(paneID);
          win.document.documentElement.showPane(pane);
        }
      } else if (Cb.App.sName == "Thunderbird"){
        // openOptionsDialog();
        openDialog("chrome://messenger/content/preferences/preferences.xul",
                   "Preferences", features, paneID);
      }
      else {
        openDialog("chrome://browser/content/preferences/preferences.xul",
                   "Preferences", features, paneID);
      }
    }
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);');
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);');
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' LouCypher, SCClockDr');
    this.setAttribute('version','20080126.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/options.html');
    this.setAttribute('dependency','FF 2.0.0.*,FL 1.0*, CB2 2.0.6*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  359. Options Cb Context

    Code Tab

    /* ----------------------------------------------------------------------------
        Options Button
        by LouCypher (aka Zoolcar9)
        Original code is Options Dialog Options extension for Firefox
        http://loucypher.wordpress.com/projects/extensions/#options-dialog-options
       ---------------------------------------------------------------------------- */
    this.openPrefs();
    

    Initialization Tab

    var brand = document.getElementById("bundle_brand");
    var appName = brand.getString("brandShortName");
    this.tooltipText = appName + " " + this.label;
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo);
    var is20 = (appInfo.version >= "2.0") && (appInfo.version != "2.0b1");
    this.openPrefs = function(aEvent) {
      if(aEvent) var paneID = aEvent.target.id;
      var features = "chrome,titlebar,toolbar,centerscreen,minimizable,resizable";
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
        .getService(Components.interfaces.nsIWindowMediator);
      var win = wm.getMostRecentWindow("Browser:Preferences");
      if(win) {
        win.focus();
        if(paneID) {
          var pane = win.document.getElementById(paneID);
          win.document.documentElement.showPane(pane);
        }
      } else
        openDialog("chrome://browser/content/preferences/preferences.xul",
                   "Preferences", features, paneID);
    }
    var cloneCBcontext = {
      cloneItems: function(aNode, aID, aSeparate) {
        var menupopup = document.getElementById(aID).cloneNode(true);
        var menuitems = menupopup.childNodes.length;
        for(var i = 0; i < menuitems; i++)
          aNode.appendChild(menupopup.firstChild);
        if(aSeparate)
          aNode.appendChild(document.createElement("menuseparator"));
      },
      makeMenu: function(aNode) {
        var m = aNode.appendChild(document.createElement("menu"));
        m.setAttribute("label", "Custom Button");
        m.setAttribute("oncommand", "event.stopPropagation()");
        var mp = m.appendChild(document.createElement("menupopup"));
        cloneCBcontext.cloneItems(mp, "custombuttons-contextpopup");
        aNode.insertBefore(document.createElement("menuseparator"), m);
      }
    }
    function addItem(aNode, aID, aLabel) {
      mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.id = aID;
      mItem.setAttribute("label", aLabel);
    }
    var panes = is20?
      ["Main", "Tabs", "Content", "Feeds", "Privacy", "Security", "Advanced"]:
      ["General", "Privacy", "Content", "Tabs", "Downloads", "Advanced"];
    const popupID = "cbContext-prefsButton";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet");
    var cPopup = main.appendChild(document.createElement("popup"));
    cPopup.id = popupID;
    cPopup.setAttribute("oncommand",
      "event.stopPropagation(); document.popupNode.openPrefs(event);")
    for(var i = 0; i < panes.length; i++) {
      addItem(cPopup, "pane" + panes[i], panes[i]);
    }
    cloneCBcontext.makeMenu(cPopup);
    this.setAttribute("context", popupID);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/options-buttons-group-firefox-flock.html');
    

    Help Tab

  360. Options Context Menu

    Code Tab

    /* ----------------------------------------------------------------------------
        Options Button
        by LouCypher (aka Zoolcar9)
        Original code is Options Dialog Options extension for Firefox
        http://loucypher.wordpress.com/projects/extensions/#options-dialog-options
       ---------------------------------------------------------------------------- */
    this.openPrefs();
    

    Initialization Tab

    var brand = document.getElementById("bundle_brand");
    var appName = brand.getString("brandShortName");
    this.tooltipText = appName + " " + this.label;
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo);
    var is20 = (appInfo.version >= "2.0") && (appInfo.version != "2.0b1");
    this.openPrefs = function(aEvent) {
      if(aEvent) var paneID = aEvent.target.id;
      var features = "chrome,titlebar,toolbar,centerscreen,minimizable,resizable";
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
        .getService(Components.interfaces.nsIWindowMediator);
      var win = wm.getMostRecentWindow("Mail:Preferences");
      if(win) {
        win.focus();
        if(paneID) {
          var pane = win.document.getElementById(paneID);
          win.document.documentElement.showPane(pane);
        }
      } else
        openDialog("chrome://messenger/content/preferences/preferences.xul",
                   "Preferences", features, paneID);
    }
    var cloneCBcontext = {
      cloneItems: function(aNode, aID, aSeparate) {
        var menupopup = document.getElementById(aID).cloneNode(true);
        var menuitems = menupopup.childNodes.length;
        for(var i = 0; i < menuitems; i++)
          aNode.appendChild(menupopup.firstChild);
        if(aSeparate)
          aNode.appendChild(document.createElement("menuseparator"));
      },
      makeMenu: function(aNode) {
        var m = aNode.appendChild(document.createElement("menu"));
        m.setAttribute("label", "Custom Button");
        m.setAttribute("oncommand", "event.stopPropagation()");
        var mp = m.appendChild(document.createElement("menupopup"));
        cloneCBcontext.cloneItems(mp, "custombuttons-contextpopup");
        aNode.insertBefore(document.createElement("menuseparator"), m);
      }
    }
    function addItem(aNode, aID, aLabel) {
      mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.id = aID;
      mItem.setAttribute("label", aLabel);
    }
    var panes = is20?
      ["General", "Display", "Composition", "Privacy", "Attachments", "Advanced", "Lightning"]:
      ["General", "Display", "Composition", "Privacy", "Attachments", "Advanced", "Lightning"];
    const popupID = "cbContext-prefsButton";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet");
    var cPopup = main.appendChild(document.createElement("popup"));
    cPopup.id = popupID;
    cPopup.setAttribute("oncommand",
      "event.stopPropagation(); document.popupNode.openPrefs(event);")
    for(var i = 0; i < panes.length; i++) {
      addItem(cPopup, "pane" + panes[i], panes[i]);
    }
    cloneCBcontext.makeMenu(cPopup);
    this.setAttribute("context", popupID);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/options-button-group-thunderbird.html');
    

    Help Tab

  361. Options Menu

    Code Tab

    /* ----------------------------------------------------------------------------
        Options Button
        by LouCypher (aka Zoolcar9)
        Original code is Options Dialog Options extension for Firefox
        http://loucypher.wordpress.com/projects/extensions/#options-dialog-options
       ---------------------------------------------------------------------------- */
    

    Initialization Tab

    var brand = document.getElementById("bundle_brand");
    var appName = brand.getString("brandShortName");
    this.tooltipText = appName + " " + this.label;
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo);
    var is20 = (appInfo.version >= "2.0") && (appInfo.version != "2.0b1");
    this.openPrefs = function(aEvent) {
      if(aEvent) var paneID = aEvent.target.id;
      var features = "chrome,titlebar,toolbar,centerscreen,minimizable,resizable";
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
        .getService(Components.interfaces.nsIWindowMediator);
      var win = wm.getMostRecentWindow("Browser:Preferences");
      if(win) {
        win.focus();
        if(paneID) {
          var pane = win.document.getElementById(paneID);
          win.document.documentElement.showPane(pane);
        }
      } else
        openDialog("chrome://browser/content/preferences/preferences.xul",
                   "Preferences", features, paneID);
    }
    function addItem(aNode, aID, aLabel) {
      mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.id = aID;
      mItem.setAttribute("label", aLabel);
    }
    var panes = is20?
      ["Main", "Tabs", "Content", "Feeds", "Privacy", "Security", "Advanced"]:
      ["General", "Privacy", "Content", "Tabs", "Downloads", "Advanced"];
    var mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute("oncommand", "this.parentNode.openPrefs(event);")
    var mi = mPopup.appendChild(document.createElement("menuitem"));
    mi.setAttribute("label", this.tooltipText);
    mi.setAttribute("oncommand",
      "event.stopPropagation(); this.parentNode.parentNode.openPrefs();");
    mPopup.appendChild(document.createElement("menuseparator"));
    for(var i = 0; i < panes.length; i++) {
      addItem(mPopup, "pane" + panes[i], panes[i]);
    }
    this.type = "menu";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/options-buttons-group-firefox-flock.html');
    

    Help Tab

  362. Options Menu button

    Code Tab

    /* ----------------------------------------------------------------------------
        Options Button
        by LouCypher (aka Zoolcar9)
        Original code is Options Dialog Options extension for Firefox
        http://loucypher.wordpress.com/projects/extensions/#options-dialog-options
       ---------------------------------------------------------------------------- */
    this.openPrefs();
    

    Initialization Tab

    var brand = document.getElementById("bundle_brand");
    var appName = brand.getString("brandShortName");
    this.tooltipText = appName + " " + this.label;
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
                    .getService(Components.interfaces.nsIXULAppInfo);
    var is20 = (appInfo.version >= "2.0") && (appInfo.version != "2.0b1");
    this.openPrefs = function(aEvent) {
      if(aEvent) var paneID = aEvent.target.id;
      var features = "chrome,titlebar,toolbar,centerscreen,minimizable,resizable";
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
        .getService(Components.interfaces.nsIWindowMediator);
      var win = wm.getMostRecentWindow("Browser:Preferences");
      if(win) {
        win.focus();
        if(paneID) {
          var pane = win.document.getElementById(paneID);
          win.document.documentElement.showPane(pane);
        }
      } else
        openDialog("chrome://browser/content/preferences/preferences.xul",
                   "Preferences", features, paneID);
    }
    function addItem(aNode, aID, aLabel) {
      mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.id = aID;
      mItem.setAttribute("label", aLabel);
    }
    var panes = is20?
      ["Main", "Tabs", "Content", "Feeds", "Privacy", "Security", "Advanced"]:
      ["General", "Privacy", "Content", "Tabs", "Downloads", "Advanced"];
    var mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute("oncommand",
      "event.stopPropagation(); this.parentNode.openPrefs(event);")
    for(var i = 0; i < panes.length; i++) {
      addItem(mPopup, "pane" + panes[i], panes[i]);
    }
    this.type = "menu-button";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/options-buttons-group-firefox-flock.html');
    

    Help Tab

  363. Options Menu Button

    Code Tab

    /* ----------------------------------------------------------------------------
        Options Button
        by LouCypher (aka Zoolcar9)
        Original code is Options Dialog Options extension for Firefox
        http://loucypher.wordpress.com/projects/extensions/#options-dialog-options
       ---------------------------------------------------------------------------- */
    this.openPrefs();
    

    Initialization Tab

    var brand = document.getElementById("bundle_brand");
    var appName = brand.getString("brandShortName");
    this.tooltipText = appName + " " + this.label;
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
                    .getService(Components.interfaces.nsIXULAppInfo);
    var is20 = (appInfo.version >= "2.0") && (appInfo.version != "2.0b1");
    this.openPrefs = function(aEvent) {
      if(aEvent) var paneID = aEvent.target.id;
      var features = "chrome,titlebar,toolbar,centerscreen,minimizable,resizable";
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
        .getService(Components.interfaces.nsIWindowMediator);
      var win = wm.getMostRecentWindow("Mail:Preferences");
      if(win) {
        win.focus();
        if(paneID) {
          var pane = win.document.getElementById(paneID);
          win.document.documentElement.showPane(pane);
        }
      } else
        openDialog("chrome://messenger/content/preferences/preferences.xul",
                   "Preferences", features, paneID);
    }
    function addItem(aNode, aID, aLabel) {
      mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.id = aID;
      mItem.setAttribute("label", aLabel);
    }
    var panes = is20?
      ["General", "Display", "Composition", "Privacy", "Attachments", "Advanced", "Lightning"]:
      ["General", "Display", "Composition", "Privacy", "Attachments", "Advanced", "Lightning"];
    var mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute("oncommand",
      "event.stopPropagation(); this.parentNode.openPrefs(event);")
    for(var i = 0; i < panes.length; i++) {
      addItem(mPopup, "pane" + panes[i], panes[i]);
    }
    this.type = "menu-button";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/options-button-group-thunderbird.html');
    

    Help Tab

  364. Options Menu Only

    Code Tab

    /*Code*/

    Initialization Tab

    var brand = document.getElementById("bundle_brand");
    var appName = brand.getString("brandShortName");
    this.tooltipText = appName + " " + this.label;
    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo);
    var is20 = appInfo.version >= "2.0";
    this.openPrefs = function(aEvent) {
      if(aEvent) var paneID = aEvent.target.id;
      var features = "chrome,titlebar,toolbar,centerscreen,minimizable,resizable";
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
        .getService(Components.interfaces.nsIWindowMediator);
      var win = wm.getMostRecentWindow("Mail:Preferences");
      if(win) {
        win.focus();
        if(paneID) {
          var pane = win.document.getElementById(paneID);
          win.document.documentElement.showPane(pane);
        }
      } else
        openDialog("chrome://messenger/content/preferences/preferences.xul",
                   "Preferences", features, paneID);
    }
    function addItem(aNode, aID, aLabel) {
      mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.id = aID;
      mItem.setAttribute("label", aLabel);
    }
    var panes = is20?
      ["General", "Display", "Composition", "Privacy", "Attachments", "Advanced", "Lightning"]:
      ["General", "Display", "Composition", "Privacy", "Attachments", "Advanced", "Lightning"];
    var mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute("oncommand", "this.parentNode.openPrefs(event);")
    var mi = mPopup.appendChild(document.createElement("menuitem"));
    mi.setAttribute("label", this.tooltipText);
    mi.setAttribute("oncommand",
      "event.stopPropagation(); this.parentNode.parentNode.openPrefs();");
    mPopup.appendChild(document.createElement("menuseparator"));
    for(var i = 0; i < panes.length; i++) {
      addItem(mPopup, "pane" + panes[i], panes[i]);
    }
    this.type = "menu";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/options-button-group-thunderbird.html');
    

    Help Tab

  365. Organize Status Bar

    Code Tab

    document.getElementById('osb_tools_menuitem').click();

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080914.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/organize-status-bar-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  366. Page

    Code Tab

    /*Code*/

    Initialization Tab

    var bar = document.getElementById('main-menubar');
    var mPopid = this.id+'cb2ChromiumButtons',mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute('id',mPopid);
    this.initBtn = function() {
      var mBarItems = bar.childNodes;
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Cut");
        mItem.setAttribute("command", "cmd_cut");
        mItem.setAttribute("key", "key_cut");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Copy");
        mItem.setAttribute("command", "cmd_copy");
        mItem.setAttribute("key", "key_copy");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Paste");
        mItem.setAttribute("command", "cmd_paste");
        mItem.setAttribute("key", "key_paste");
        var separator = document.getElementById(mPopid).appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + 1;
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Find in page");
        mItem.setAttribute("command", "cmd_find");
        mItem.setAttribute("key", "key_find");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Save page as...");
        mItem.setAttribute("command", "Browser:SavePage");
        mItem.setAttribute("key", "key_savePage");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Print...");
        mItem.setAttribute("command", "cmd_print");
        mItem.setAttribute("key", "printKb");
        var separator = document.getElementById(mPopid).appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + 1;
        var mItem = document.getElementById(mPopid).appendChild(document.getElementById('viewFullZoomMenu'));
        mItem.setAttribute("label", "Zoom");
        var mItem = document.getElementById(mPopid).appendChild(document.getElementById('charsetMenu'));
        mItem.setAttribute("label", "Encoding");
        var separator = document.getElementById(mPopid).appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + 1;
        var mPopidi = this.id+'cb2ChromiumButtonsi',mPopupi = document.getElementById(mPopid).appendChild(document.createElement("menu"));
        mPopupi.setAttribute('id',mPopidi);
        mPopupi.setAttribute("label", "Developer");
        var mPopidik = this.id+'cb2ChromiumButtonsik',mPopupik = document.getElementById(mPopidi).appendChild(document.createElement("menupopup"));
        mPopupik.setAttribute('id',mPopidik);
        var mItemi = document.getElementById(mPopidik).appendChild(document.createElement("menuitem"));
        mItemi.setAttribute("label", "Source");
        mItemi.setAttribute("command", "View:PageSource");
        mItemi.setAttribute("key", "key_viewSource");
        var mItemi = document.getElementById(mPopidik).appendChild(document.createElement("menuitem"));
        mItemi.setAttribute("label", "Javascript console");
        mItemi.setAttribute("oncommand", "toJavaScriptConsole();");
        mItemi.setAttribute("key", "key_errorConsole");
        var separator = document.getElementById(mPopid).appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + 1;
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Report bug or broken website...");
        mItem.setAttribute("command", "menu_HelpPopup_reportertoolmenu");
    }
    setTimeout(this.initBtn, 1000);
    // Our two images, labeled correspondingly
    var imgOpen = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAATCAYAAACDW21BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF3GlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHja7VZrMJQLGH6/Zdt1j12JRV83VC4bkRTha5O00VLWNWt3LbFrW+sWpdBNUbGK0kUXQhxdSSlKdEjlEkc3ScQpIrcinB9mqjkz58eZ6WfPzDvzzvPjfed95pl5XgAZfRpGd8YBAF8gFjHsbFGmmztKqAdZ0AJZoIAJix0ipDuvdgEAcKZhaAiXzYcfQACGnwECANCgT3Nh2MP/gwJbKBIDICgAWLNZQWIAxAcAyOFioRgAEQMAWeTCwACQfQA4eZ4LAwOQkgDg5H1dGBgA/gwATl7EdHMHIFwCADJvqi8DALLvVN8IAGQ7VoAAgNAFAGQOX8ABIHwDAB8On8MBIHoCgA+HG8IGIN4GAKGYGyEGAMCChZGiAJ6/GPWNRJ1pmBHN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Dt67Q5A0wD6VWgAlwQrC1cHB46dGrfi2/R0NByU0NjarFULN728cDnHabI2tpU6y2Pf2rmyzO/wt0Af8yM7a4AIiFXCTSzkqTLwyfeOF7W/h1D7490SIm1EyMz8+eZg60tnf14N8vzIivIqZlPekOVq//QOQfuv1PHzEpmljGzeTObBxZKLm2By9maujQwOfPXWE8ht0ApV1KQk0LYZLi/CgSHU/D/8uQCJFft49LA5NX5sd5Cfs4u/z3SVw6rMI1zDpYybJKszDjlwbWlfQeuet7NLC1pci57pjMcgemqsTAJyfHt+V83VSqvWNGLP/3WKKdlR68LNbPptbByhZKETExNz+6Au69LKlZ5V/LY8c86KuJb4yy9t6nxoRPkU3EjQkDanPJQ3tUVnxue6pSoa1mcufbFfjP7uZZZOrt157av/UQkB54ipBS1JvksX82KWrN8mhRlsxJ1zYvb2reeBWZrVRgDNgPNQN0652G51sUQds3MChtRaDf6xP93AHX5gUCNmwtHAAAAAElFTkSuQmCC';
    // toggles the image to Open State
    this.toggleImgOpen = function() {
        //this.setAttribute("image",imgOpen);
    }
    // latter
    this.toggleImgClosed = function() {
      //this.setAttribute("image",imgClosed);
    }
    var that = this;
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 10);
      }
    }
    this.hideDropMarker();
    this.type="menu";
    this.image = imgClosed; // make sure it initializes with the correct image
      // START RESTART
      var restart = 
        "if (gBrowser.warnAboutClosingTabs(\"All\")) { // Idea from _pi Thanks!\n" +
        "  var appStartup = Components.classes[\"@mozilla.org/toolkit/app-startup;1\"].getService(Components.interfaces.nsIAppStartup);\n" +
        "  appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);\n" +
        "} // End if (gBrowser.warnAboutClosingTabs(\"All\"))\n";
      // END RESTART
    // BUTTON ATTRIBUTES
    this.setAttribute("onmouseover", "this.hideDropMarker();");
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("author",'Eleon');
    this.setAttribute("version",'20090307.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-chrome-two-buttons-page-and-tools.html');
    this.setAttribute("dependency",'FF 3.0.*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);

    Help Tab

  367. Page Note

    Code Tab

    /*Code*/

    Initialization Tab

    this.quot = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
    switch(evt.button) {
    case 0:
    q7Hm8=prompt('Write Note:','');if(q7Hm8!=null){pVj5D=86400000*prompt('Enter number of days to retain note:','15');dT9v=new Date;dT9v.setTime(dT9v.getTime()+pVj5D);void(content.document.cookie='cOmM3enT='+escape(q7Hm8)+'; expires='+dT9v.toGMTString())}else{void(null)}
    break;
    case 1:
    this.showPopup(this);
    break;
    case 2:
    dL8=content.document.cookie.indexOf('cOmM3enT');if(dL8!=-1){d7n=content.document.cookie.substring(dL8+9,content.document.cookie.length);uHm=d7n.indexOf(';');dUP=(uHm==-1)?d7n.length:uHm;void(prompt('Read Note:',unescape(d7n.substring(0,dUP))))}else{alert('No note has been made.')}
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.quot(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L = Write | M = Menu | R = Read";
    this.img1 = this.image;
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','newf');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/page-note-newf.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    null
  368. Pageaddict Button

    Code Tab

    /*Code*/
    /* Left click opens pages in new tabs.
       To add more pages add more lines */
    gBrowser.addTab("http://pageaddict.com/");

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080923.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/pageaddict-button.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,Left click opens pages in new tabs\nAdd new lines to add pages');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    Left%20click%20opens%20pages%20in%20new%20tabs%0AAdd%20new%20lines%20to%20add%20pages
  369. Paint

    Code Tab

     

    Initialization Tab

     this.quot = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
    var link="http://app5.ajaxsketch.com/apps/drawsvg/content/index.xul?doc=http://localhost/apps/drawsvg/welcome.svg?path=&user=&pass=&doc=";
    var label="Paint";
    var head =(document.getElementById('sidebar-title').getAttribute('value') == label); 
      switch(evt.button) {
    case 0:
    loadURI(link);
    break;
    case 1:
    gBrowser.addTab(link);
    break;
    case 2:
    	if (!head) {
    	openWebPanel();
    	var sbLoc = document.getElementById('sidebar').contentDocument.location;
    	sbLoc.href = link;
    	document.getElementById('sidebar-box').hidden = false;
    	document.getElementById('sidebar-title').value = label;
    	document.getElementById('sidebar-box').collapsed = false;
    	document.getElementById('sidebar-splitter').hidden = false;
    	return;
    	}
    	if (head) {
    	   toggleSidebar();
    	}
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
     document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    this.tooltipText = 'L = Current Tab | M = New Tab | R = Toggles in Sidebar';
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/paint-not-m-newf.html');

    Help Tab

  370. Panic Button

    Code Tab

    /*CODE*/
    var prefBranch = Components.classes["@mozilla.org/preferences-service;1"].
      getService(Components.interfaces.nsIPrefBranch);
    var homePage = prefBranch.getCharPref("browser.startup.homepage");
    gBrowser.selectedTab = gBrowser.addTab(homePage);
    gBrowser.removeAllTabsBut(gBrowser.selectedTab);
    document.getElementById("sanitizeItem").click();
    /*END*/

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/panic-button.html');

    Help Tab

    Just Press the button, and it automaticly shuts every tab and just keeps your homepage open. it also deletes
    your browsing history
    Any Problems? Email me at vatteck@live.com
  371. Paste and go

    Code Tab

    /*Code*/
     this.tooltipText = "Paste and go"
    var myurl = custombuttons.gClipboard.read(); 
      if(myurl.substring(0,7) == "http://")
      {
        window.open(myurl);
      }
      else
      {
        if(myurl.substring(0,4) == "www.")
        {
          myurl = "http://" + myurl
          window.open(myurl);
        }
        else
        {
          alert("URL error. Clipboard contents are:- " + myurl);
        }
      }

    Initialization Tab

    /*Initialization code*/
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','squeaky');
    this.setAttribute('version','20080430.1.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/paste-and-go-cb2.html');
    this.setAttribute('dependency','FF2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    %0A/*%20+++-----------------------%20help%20information%20for%20this%20button%20-----------------------+++%20*/%0A%0ANo%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.%0A%0A
  372. Paste and go

    Code Tab

    /*Code*/
     this.tooltipText = "Paste and go"
    var myurl = custombuttons.gClipboard.read(); 
      if(myurl.substring(0,7) == "http://")
      {
        window.open(myurl);
      }
      else
      {
        if(myurl.substring(0,4) == "www.")
        {
          myurl = "http://" + myurl
          window.open(myurl);
        }
        else
        {
          alert("URL error. Clipboard contents are:- " + myurl);
        }
      }

    Initialization Tab

    /*Initialization code*/
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','squeaky');
    this.setAttribute('version','20080430.1.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/paste-and-go-cb2.html');
    this.setAttribute('dependency','FF2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    %0A/*%20+++-----------------------%20help%20information%20for%20this%20button%20-----------------------+++%20*/%0A%0ANo%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.%0A%0A
  373. Paste as HTML (New Tab)

    Code Tab

    function list2links(text){
    	text = text.replace(/&/g,'&amp;').replace(/>/g,'&gt;').replace(/</g,'&lt;');
    	var lines=text.split('\n');
    	for(var i=0;i<lines.length;i++){
    		if((lines[i].length>0) && (lines[i].toLowerCase().indexOf('http')>-1)){
    			lines[i]=lines[i].link(lines[i]);
    		}
    	}
    	return '<html><head><title>(pasted text)</title></head><body>' + 
    	       lines.join('<br>\n') + 
    	       '</body></html>';
    }
    function doLinks(text){
    	rx = /(https?:\/\/(:?www.)?[\w\.~#&\?\/\:\-=;,%\+]+)/gi
    	text = text.replace(/&/g,'&amp;')
    	           .replace(/>/g,'&gt;')
    	           .replace(/</g,'&lt;')
    	           .replace(/\n/g,'<br>\n');
    	text = text.replace(rx,"<a href='$1'>$1</a>")
    	return '<html><head><title>(pasted)</title></head><body>' + 
    	       text + 
    	       '</body></html>';
    }
    var paste = readFromClipboard();
    if (paste && paste.length!=0){
    	//alert(doLinks(paste));
    	var encoded = btoa(doLinks(paste));
    	//var data_url = "data:text/plain;base64," + encoded;
    	var data_url = "data:text/html;base64," + encoded;
    	gBrowser.selectedTab = gBrowser.addTab(data_url);
    }
    

    Initialization Tab

      this.style.opacity = '1';
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/paste-clipboard-text-new-tab-html.html');

    Help Tab

  374. Permanent Bookmark

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    let mWid = 55;
    function fileName(){
    	let dir = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile);
    	dir.append("custombuttons");
    	if (!dir.exists()) {
    		try{
    			dir.create(0x01, 0755);
    		} catch(e){
    			let msg='Custom Buttons error.]'+'[ Event: Creating custombuttons directory]'+'[ '+e;Components.utils.reportError(msg);
    		}
    	}
    	return dir.path;
    }
    function writeFile( sFilePath, sFileContent ){
    	try{
    		sFilePath = (sFilePath.indexOf(':\\') > -1 )? sFilePath.replace(/\//g,'\\') : sFilePath;
    		let file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
    		file.QueryInterface(Components.interfaces.nsIFile);
    		file.initWithPath( sFilePath );
    		if( file.exists() == true ) file.remove( false );
    		let strm = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
    		strm.QueryInterface(Components.interfaces.nsIOutputStream);
    		strm.QueryInterface(Components.interfaces.nsISeekableStream);
    		strm.init( file, 0x04 | 0x08, 420, 0 );
    		strm.write( sFileContent, sFileContent.length );
    		strm.flush();
    		strm.close();
    	}catch(ex){
    		window.alert(ex.message+'nnn');
    	}
    }
    function readFile(sFilePath) {
    	let file = null;
    	sFilePath = (sFilePath.indexOf(':\\') > -1 )? sFilePath.replace(/\//g,'\\') : sFilePath;
    	// sFilePath=sFilePath.replace(/\//g,'\\');
    	try {
    		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    	} catch (e) {
    		alert("Permission to read file was denied.");
    	}
    	try {
    		file = Components.classes["@mozilla.org/file/local;1"]
    			.createInstance(Components.interfaces.nsILocalFile);
    		file.initWithPath( sFilePath);
    	}
    		catch(e){
    		alert(e);
    	}
    	if ( file.exists() == false ) {
    		writeFile(sFilePath,"");
    	}
    	let is = Components.classes["@mozilla.org/network/file-input-stream;1"]
    		.createInstance( Components.interfaces.nsIFileInputStream );
    	is.init( file,0x01, 00004, null);
    	let sis = Components.classes["@mozilla.org/scriptableinputstream;1"]
    		.createInstance( Components.interfaces.nsIScriptableInputStream );
    	sis.init( is );
    	let output = sis.read( sis.available() );
    	return output;
    }
    //********  Read write ******
    let mp;
    this.removeNode = function( aNode ){
    	closeMenus( aNode );
    	mp.removeChild( aNode );
    	//reAssignId();
    };
    function reAssignId(){
    	let NL=mp.childNodes;
    	for(let i=0;i<NL.length;i++)
    	{
    		mp.removeChild(NL[i].id=i+1);
    	}
    }
    function addMenuItem(aNode, aLabel,aURL,aImg, aContextId, aCommand) {
    	let mi = aNode.appendChild(document.createElement("menuitem"));
    	mi.setAttribute("label", aLabel.substr(0,mWid));
    	mi.setAttribute("value", aURL);
    	mi.setAttribute("class","menuitem-iconic")
    	mi.setAttribute("image", aImg);
    	mi.setAttribute("name", aImg);
    	mi.setAttribute("id",aNode.childNodes.length);
    	if(aContextId) mi.setAttribute("context", aContextId);
    	if(aCommand) mi.setAttribute("oncommand", aCommand);
    }
    function donoth(){}
    /* ============  Execute Init Code ============ */
    let contextId = "popup-item-bookmark";
    let test = document.getElementById(contextId);
    if(test) test.parentNode.removeChild(test);
    let mainPopup = document.getElementById("mainPopupSet");
    let context = mainPopup.appendChild(document.createElement("popup"));
    context.id = contextId;
    addMenuItem(context, "Remove Item?",null,this.image, null, "alert(document.popupNode.label); document.popupNode.parentNode.parentNode.removeNode(document.popupNode);");
    let filePath=fileName()+"/Bookmarks.txt";
    let data=readFile(filePath);
    let popupItems=data.split('\n');
    mp = document.createElement("menupopup");
    addMenuItem(mp, "Save","Save",this.image,null,"this.parentNode.parentNode.save()");
    mp.setAttribute("oncommand", "this.parentNode.openPage(event)");
    for (let i in popupItems) {
    	popupItems[i].replace(/\\s/g,'');
    	if(popupItems[i].length>1){
    	   let pItem=popupItems[i].split("]~[");
    		if(pItem.length==3)
    		{
    		  addMenuItem(mp, pItem[0],pItem[1],pItem[2], contextId);
    		}
    	}
    } // End for
    function getData(){
    	let NL=mp.childNodes;
    	let data="";
    	for(let i=1;i<NL.length;i++){
    		let img=NL[i].getAttribute("image");
    		data=data+NL[i].label+"]~["+NL[i].value+"]~["+img+"\n";
    	}
    	return data;
    }
    this.execute=function(evt){
    	if(evt.target.value==-1) AddMenuItem();
    }
    function AddMenuItem(){
    	let img=document.getElementById("page-proxy-favicon").src;
    	let name=content.document.title;
    	let url=document.getElementById("urlbar").value;
    	addMenuItem(mp,name,url,img,contextId);
    }
    this.save = function()
    {
    	writeFile(filePath,getData())
    };
    this.openPage = function( e )
    {
    	let link = e.target.value
    	if (link != "Save"){
    		let newTab = gBrowser.addTab(link);
    		gBrowser.selectedTab = newTab;
    	}
    }
    this.type = "menu-button";
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("oncommand", "this.execute(event);");
    this.appendChild(mp);
    this.value=-1;
    /*this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    */
    this.setAttribute("author", "deepakjoshi04,SCClockDr" );
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.setAttribute("dependency","FF 2.0,CB 2.0.*");
    this.setAttribute("version","20080124.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/permanent-bookmark.html');
    //this.tooltipText = this.label + "INSERT TOOLTIP VALUE HERE";

    Help Tab

    Help%20has%20not%20been%20defined%20for%20this%20button.
  375. Permanent Bookmark

    Code Tab

    /*Code*/

    Initialization Tab

    function fileName()
    {
    		var dir = Components.classes["@mozilla.org/file/directory_service;1"]
    		           .getService(Components.interfaces.nsIProperties)
    		           .get("ProfD", Components.interfaces.nsIFile);
    		dir.append("custombuttons");
    		if (!dir.exists()) {
    			try{
    				dir.create(0x01, 0755);
    			} catch(e){
    				var msg='Custom Buttons error.]'
    					+'[ Event: Creating custombuttons directory]'
    					+'[ '+e;
    				Components.utils.reportError(msg);
    			}
    		}
    	return dir.path;
    }
    function writeFile( sFilePath, sFileContent )
    {
      try
      {
        sFilePath=sFilePath.replace(/\//g,'\\');
        var file = Components.classes["@mozilla.org/file/local;1"]
                      .createInstance(Components.interfaces.nsILocalFile);
        file.QueryInterface(Components.interfaces.nsIFile);
        file.initWithPath( sFilePath );
        if( file.exists() == true ) file.remove( false );
        var strm = Components.classes["@mozilla.org/network/file-output-stream;1"]
                      .createInstance(Components.interfaces.nsIFileOutputStream);
        strm.QueryInterface(Components.interfaces.nsIOutputStream);
        strm.QueryInterface(Components.interfaces.nsISeekableStream);
        strm.init( file, 0x04 | 0x08, 420, 0 );
        strm.write( sFileContent, sFileContent.length );
        strm.flush();
        strm.close();
      }
      catch(ex)
      {
        window.alert(ex.message);
      }
    }
    function readFile(sFilePath) {
        sFilePath=sFilePath.replace(/\//g,'\\');
    	try {
    		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    	} catch (e) {
    		alert("Permission to read file was denied.");
    	}
    	var file = Components.classes["@mozilla.org/file/local;1"]
    		.createInstance(Components.interfaces.nsILocalFile);
    	file.initWithPath( sFilePath);
    	if ( file.exists() == false ) {
    	writeFile(sFilePath,"");
    	}
    	var is = Components.classes["@mozilla.org/network/file-input-stream;1"]
    		.createInstance( Components.interfaces.nsIFileInputStream );
    	is.init( file,0x01, 00004, null);
    	var sis = Components.classes["@mozilla.org/scriptableinputstream;1"]
    		.createInstance( Components.interfaces.nsIScriptableInputStream );
    	sis.init( is );
    	var output = sis.read( sis.available() );
    	return output;
    }
    //********  Read write ******
    var mp;
    removeNode=function(aNode)
    {
    	mp.removeChild(aNode);
    	reAssignId();
    }
    function reAssignId()
    {
    	var NL=mp.childNodes;
    	for(var i=0;i<NL.length;i++)
    	{
    		mp.removeChild(NL[i].id=i+1);
    	}
    }
    function addMenuItem(aNode, aLabel,aURL,aImg, aContextId, aCommand) {
       var mi = aNode.appendChild(document.createElement("menuitem"));
       mi.setAttribute("label", aLabel);
       mi.setAttribute("value", aURL);
       mi.setAttribute("class","menuitem-iconic")
       mi.setAttribute("image", aImg);
       mi.setAttribute("name", aImg);
       mi.setAttribute("id",aNode.childNodes.length);
      if(aContextId) mi.setAttribute("context", aContextId);
      if(aCommand) mi.setAttribute("oncommand", aCommand);
    }
    var contextId = "popup-item-bookmark";
    var test = document.getElementById(contextId);
    if(test) test.parentNode.removeChild(test);
    var mainPopup = document.getElementById("mainPopupSet");
    var context = mainPopup.appendChild(document.createElement("popup"));
    context.id = contextId;
    addMenuItem(context, "Remove Item?",null,this.image, null,
      "closeMenus(document.popupNode); " +
      "removeNode(document.popupNode);");
    var filePath=fileName()+"/Bookmarks.txt";
      var data=readFile(filePath);
    	var popupItems=data.split('\n');
    mp = document.createElement("menupopup");
    addMenuItem(mp, "Save","Save",this.image,null,"save()");
    mp.setAttribute("oncommand", "openPage(event.target.value)");
    for(var i = 0; i < popupItems.length; i++) {
    	popupItems[i].replace(/\\s/g,'');
    	if(popupItems[i].length>1)
    	{
    	   var pItem=popupItems[i].split("::");
    		if(pItem.length==3)
    		{
    		  addMenuItem(mp, pItem[0],pItem[1],pItem[2], contextId);
    		}
    	}
    }
    function getData()
    {
    	var NL=mp.childNodes;
    	var data="";
    	for(var i=1;i<NL.length;i++)
    	{
    		var img=NL[i].getAttribute("image");
    		alert("Image "+img);
    		data=data+NL[i].label+"::"+NL[i].value+"::"+img+"\n";
    	}
    	return data;
    }
    this.execute=function(evt)
    {
    	if(evt.target.value==-1)
    	AddMenuItem();
    }
    function AddMenuItem()
    {
    	var img=document.getElementById("page-proxy-favicon").src;
    	var name=content.document.title;
    	var url=document.getElementById("urlbar").value;
    	//alert('Name : '+name+' URL : '+url+' Image : '+img);
    	addMenuItem(mp,name,url,img,contextId);
    }
    save=function()
    {
    writeFile(filePath,getData())
    }
    openPage=function(link)
    {
    	loadURI(link);
    }
    this.type = "menu-button";
    this.setAttribute("oncommand", "this.execute(event);");
    this.appendChild(mp);
    this.value=-1;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/permanent-bookmarks.html');

    Help Tab

  376. phpBB3 Forum Emoticons

    Code Tab

    /*Code*/
    

    Initialization Tab

    var Cb=custombuttons;
    var num=Cb.getNumber(this.id);
    var prefstring = "custombuttons.forumEmoticons-"+num+".menu";
    var poststr="",btnlbl,cbTitl,cbCode,cbImg,cbCodes=[],cbImgs=[],cbTitls=[],root=Cb.getPrefs(prefstring+"-siteroot"),mPop,popupID="cbMenucbForumEmoticons"+num,that=this;
    var form_url=root+"/posting.php?mode=smilies";
    var favicon=root+"/favicon.ico";
    var cbTtl = "phpBB3 Forum Emoticons";
    var cbDef = "phpBB3 Forum Emoticons";
    var cbLbl = "Please select the emoticons that you would like to have in your menu";
    var cbAcc = "Accept";
    var cbCnl = "Don't Accept";
    var cbPmp = "Please set the root of the phpBB3 forum you will be using this for\nExample: \"http://custombuttons2.com/forum\" (no trailing slash please):";
    var cbPdf = "http://";
    var cbAlr = "You must set a phpBB3 Forum's root site\nin order to use this button";
    var cbPst = "Your phpBB3 Forum root site has been set";
    var cbPnt = "Your phpBB3 Forum root site was NOT reset";
    this.html_entity_decode = function(str) {
      var tarea=content.document.createElement('textarea');
      tarea.innerHTML = str; return tarea.value;
      tarea.parentNode.removeChild(tarea);
    }
    var http_request = false;
    this.makePOSTRequest = function(url, parameters, mode) {
      http_request = false;
      if (window.XMLHttpRequest) {
        http_request = new XMLHttpRequest();
        if (http_request.overrideMimeType) {
          http_request.overrideMimeType('text/html');
        }
      }
      if (!http_request) {
        alert('Cannot create XMLHTTP instance');
        return false;
      }
      http_request.onreadystatechange = this.alertContents1;
      http_request.open('POST', form_url, true);
      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http_request.setRequestHeader("Content-length", parameters.length);
      http_request.setRequestHeader("Connection", "close");
      http_request.send(parameters);
    }
    this.alertContents1 = function() {
      if (http_request.readyState == 4) {
        if (http_request.status == 200) {
          regHd = /\<\!DOCTYPE(.*?)\<div\sclass\=\"inner\"\>\<span\sclass\=\"corners\-top\"\>\<span\>\<\/span\>\<\/span\>/i;
          regEx = /(.*?)\<a\shref\=\"\#\"\sonclick\=\"insert\_text\(\'(.*?)\'(.*?)\<img\ssrc\=\"\.(.*?)\"\swidth.*?title\=\"(.*?)\".*?\>\<\/a\>/ig;
          regFt = /\s\<span\sclass\=\"corners\-bottom\"\>.*/i;
          regTl = /.*?\<title\>(.*)\<\/title\>.*/i;
          result = http_request.responseText;
          result = result.replace(/([\s]+)/g, " ");
          btnlbl = result.replace(regTl, "$1");
          result = result.replace(regHd, "");
          result = result.replace(regFt, "");
          root=Cb.getPrefs(prefstring+"-siteroot");
          favicon = root+"/favicon.ico";
          cbTtl = (Cb.isPref(prefstring+"-btnlbl")) ? that.html_entity_decode(Cb.getPrefs(prefstring+"-btnlbl")) : cbTtl;
          cbTitl = result.replace(regEx, "$5¥");
          cbTitls = cbTitl.split("¥");
          cbCode = result.replace(regEx, "$2¥");
          cbCodes = cbCode.split("¥");
          cbImg = result.replace(regEx, root+"$4¥");
          cbImgs = cbImg.split("¥");
          var cbArr=[],cbTitln="",cbCoden="",cbImgn="";
          for(i=0;i<cbCodes.length;i++) {
            if(i!=(cbCodes.length-1)) cbArr.push([cbTitls[i],true,cbCodes[i],cbImgs[i]]);
          }
          var cbCheck = custombuttons.checkboxDialog(that,cbArr,cbTtl,cbLbl,null,null,cbAcc,cbCnl,null,null,null,null);
          if (cbCheck) {
            for(i = 0; i < cbArr.length; i++) {
              if(cbArr[i][1] == true) {
                cbTitln += cbArr[i][0]+"¥";
                cbCoden += cbArr[i][2]+"¥";
                cbImgn += cbArr[i][3]+"¥";
              }
            }
            Cb.setPrefs(prefstring+"-btnlbl", btnlbl);
            Cb.setPrefs(prefstring+"-cbTitl", cbTitln);
            Cb.setPrefs(prefstring+"-cbCode", cbCoden);
            Cb.setPrefs(prefstring+"-cbImg", cbImgn);
            var ximg = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-icon");
            ximg.setAttribute("style", 'background-image:url("'+favicon+'")!important;');
            that.init();
            Cb.alertSlide(that.label,"Smilies Reconfigured");
          }
          else { 
            Cb.alertSlide(that.label,"Smilies NOT Reconfigured");
          }
        } else {
          alert('There was a problem with the request.');
        }
      }
    }
    this.get = function(obj) {
      root=Cb.getPrefs(prefstring+"-siteroot");
      form_url=root+"/posting.php?mode=smilies";
      poststr = "";
      this.makePOSTRequest(form_url, poststr,1);
    }
    this.setRoot = function(mode) {
      var cbSetRoot = Cb.promptBox(cbDef, cbPmp, cbPdf);
      if ((cbSetRoot[0] == false) && (!Cb.isPref(prefstring+"-siteroot"))) {
        Cb.alertBox(this.label, cbAlr);
      }
      else if (cbSetRoot[0] == false) {
        Cb.alertSlide(this.label,cbPnt);
      }
      else {
        Cb.setPrefs(prefstring+"-siteroot", cbSetRoot[1]);
        Cb.alertSlide(cbDef,cbPst);
        if (mode == 'reset') this.get();
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById(popupID);
      document.popupNode = node;
      popup.openPopup(node, "after_start", null, null, "popup", null, null);
    }
    this.leftclick   = function(evt){
      if (!Cb.isPref(prefstring+"-siteroot")) this.setRoot();
      if (!Cb.isPref(prefstring+"-siteroot")) return;
      if (!Cb.isPref(prefstring+"-cbTitl")) this.get();
      if (evt.originalTarget.id == this.id) this.showPopup(this);
    };
    this.midclick    = function(evt){
      this.get();
    }; this.cleftclick = function(evt) { this.midclick(evt); }
    nItem=function(label,value,img){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',label);
      if(value.match("this.parent")) mItem.tooltipText = label;
      else mItem.tooltipText = value;
      mItem.value = value;
      mItem.setAttribute('class','menuitem-iconic');
      mItem.setAttribute('image',img);
      mItem.setAttribute('name',name);
      if(value.match("this.parent")) mItem.setAttribute('oncommand',value);
      else mItem.setAttribute('oncommand',"this.parentNode.parentNode.pasteItem(' "+value+" ');");
      return mItem;
    }
    this.init = function() {
      var ximg = document.getAnonymousElementByAttribute(this, "class", "toolbarbutton-icon");
      ximg.setAttribute("style", 'background-image:url("'+favicon+'")!important;');
      var img = favicon;
      var bLabl = (Cb.isPref(prefstring+"-btnlbl")) ? Cb.getPrefs(prefstring+"-btnlbl") : "";
      var mTitl = (Cb.isPref(prefstring+"-cbTitl")) ? Cb.getPrefs(prefstring+"-cbTitl") : "";
      var mCode = (Cb.isPref(prefstring+"-cbCode")) ? Cb.getPrefs(prefstring+"-cbCode") : "";
      var mImg = (Cb.isPref(prefstring+"-cbImg")) ? Cb.getPrefs(prefstring+"-cbImg") : "";
      var mTitls = mTitl.split("¥");
      var mCodes = mCode.split("¥");
      var mImgs = mImg.split("¥");
      var meNu = new Array();
      for(i=0;i<mCodes.length;i++) {
        if(i!=(mCodes.length-1)) meNu.push([mTitls[i],mCodes[i],mImgs[i]]);
      }
      meNu.push(['separator']);
      meNu.push(['Change button\'s phpBB3 Forum','this.parentNode.parentNode.setRoot("reset");',img]);
      meNu.push(['Reconfigure Smilies','this.parentNode.parentNode.get();',img]);
      if (document.getElementById(popupID)) this.removeChild(this.firstChild);
      mPop=document.createElement('menupopup');
      mPop.setAttribute("id", popupID);
      if (Cb.getPrefs(prefstring+"-cbTitl") != "" && Cb.getPrefs(prefstring+"-cbTitl") != null) {	
        for (var i=0;i<meNu.length;i++){
          if (meNu[i] =='separator') {
            mPop.appendChild(document.createElement('menuseparator'));
          }
          else {
            mPop.appendChild(nItem(meNu[i][0],meNu[i][1],meNu[i][2]));
          }
        }
        this.appendChild(mPop);
      }
      this.label = (bLabl == "") ? "phpBB3 Forum Emoticons" : this.html_entity_decode(bLabl);
      this.tooltipText = this.label + '\n' +
                        'Click an item to paste at cursor position\n' +
                        'M or Ctrl+L: Reconfigure Button';
      var ximg = document.getAnonymousElementByAttribute(this, "class", "toolbarbutton-icon");
      ximg.setAttribute("style", 'background-image:url("'+favicon+'")!important;');
    }
    this.init();
    this.pasteItem= function(value) {
      var theBox = document.commandDispatcher.focusedElement;
      var startPos = theBox.selectionStart;
      var endPos = theBox.selectionEnd;
      var oPosition = theBox.scrollTop;
      var oHeight = theBox.scrollHeight;
      var text=theBox.value.substring(0,startPos);
      var nHeight = theBox.scrollHeight - oHeight;
      var str = value;
      text +=str;
      text +=theBox.value.substring(endPos, theBox.value.length);
      theBox.value = text;
      theBox.selectionStart = startPos + str.length;
      theBox.selectionEnd = startPos + str.length;
      theBox.scrollTop = oPosition + nHeight;
    }
    this.value=-1;
    this.setAttribute( 'onclick', 'gQuot( event, this )' );
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081218.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/phpbb3-forum-emoticons.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.7.96*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

  377. PicLens

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    this.leftclick  = function(evt){
    	gPicLensWindow.launchButtonClicked()
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    this.style.opacity = "0.85";
    /*---------------------- Button Code Block Start ------------------------*/
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','squeaky, jw25, SSClockDr, others');
    this.setAttribute('version','20080326.1.0');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/coolirispiclens-launch-extension-buttons.html');
    this.setAttribute('dependency','PicLens');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText = label;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /* +==================== help for thisbutton ====================+ */
  378. PicLens alpha

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    this.leftclick  = function(evt){
    	launchPicLens();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    this.style.opacity = "0.85";
    /*---------------------- Button Code Block Start ------------------------*/
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','squeaky, jw25, SSClockDr, others');
    this.setAttribute('version','20080326.1.0');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/coolirispiclens-launch-extension-buttons.html');
    this.setAttribute('dependency','PicLens');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /* +==================== help for thisbutton ====================+ */
  379. Pidgin

    Code Tab

    /*Code*/

    Initialization Tab

    var label='Pidgin';
    var img='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABnRSTlMAAAAAAABupgeRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB4ElEQVR4nHWPzU8TURTFz5s3nem06dS0ChrFBmszpFopAkJcaEjAkCCQ1LXBPSbGHcLChf+B/BFui0vTRAM7WRg/JwgaS5lo+Uil0tLOmzfPRZM6teVubu6555dzL0Fr6bo+/3AenSqXy62/XSdeKRQKrbzMjoyOdATKh+WZmVmpOatUjcfiJ7kB6GF9Ynz8H5CMXjv1+/TS/afF/N5JDADaaOfDPbevj1253K+q2vvcx1KpZAwk2t1rq2u0cczjzILEZeY47Jgx5vzZrVbKlXh/bzsgAbiTnop0R+89mo5EIpoSVGVN2KR6UN/bPmgPkQAke1I37w5tft66lRmVoSqSFr/aSwPYz+93BjjjPz4U0sOp7+8KDTX/ySIOsW3nP7dlWQTAUuaZSkINKTV4Jq2srnwdKu7+zG68ADD3YK6vz3iysAjANE0ZgOMwn+QCMGL2WCDrP9ycDH5b3NFN0wSw/HzZsqxmiAxAoX4IANjIK1vbN85plwrVrpr7pnlGyw8Xwhc1f6A5c0F3qt0AYtG4roTbn6aT6WlVBBWf6lW567iMDyaGK0eV4tGvlgQfFObY3OVetW7XGGO8jomBKaMr6V3Jr7+8Ms4mCAillFKJC4lz4XAmIAiIgKjxYy/wF1BptW3inZJpAAAAAElFTkSuQmCC';
    var path='C:/Program Files/Pidgin/pidgin.exe';
    //var path='c:/windows/explorer.exe';
    var args='';
      this.label=label;
      this.setAttribute('oncommand','this.startProcess("'+path+'","'+args+'")');
      this.image=img;
      this.tooltipText = label;
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
    // file.launch();
     process.init(file);
     process.run(false,[args],1); 
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/pidgin-launch-snwbdr987.html');

    Help Tab

  380. Pidgin

    Code Tab

    /*Code*/

    Initialization Tab

    var label='Pidgin';
    var img='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABnRSTlMAAAAAAABupgeRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB4ElEQVR4nHWPzU8TURTFz5s3nem06dS0ChrFBmszpFopAkJcaEjAkCCQ1LXBPSbGHcLChf+B/BFui0vTRAM7WRg/JwgaS5lo+Uil0tLOmzfPRZM6teVubu6555dzL0Fr6bo+/3AenSqXy62/XSdeKRQKrbzMjoyOdATKh+WZmVmpOatUjcfiJ7kB6GF9Ynz8H5CMXjv1+/TS/afF/N5JDADaaOfDPbevj1253K+q2vvcx1KpZAwk2t1rq2u0cczjzILEZeY47Jgx5vzZrVbKlXh/bzsgAbiTnop0R+89mo5EIpoSVGVN2KR6UN/bPmgPkQAke1I37w5tft66lRmVoSqSFr/aSwPYz+93BjjjPz4U0sOp7+8KDTX/ySIOsW3nP7dlWQTAUuaZSkINKTV4Jq2srnwdKu7+zG68ADD3YK6vz3iysAjANE0ZgOMwn+QCMGL2WCDrP9ycDH5b3NFN0wSw/HzZsqxmiAxAoX4IANjIK1vbN85plwrVrpr7pnlGyw8Xwhc1f6A5c0F3qt0AYtG4roTbn6aT6WlVBBWf6lW567iMDyaGK0eV4tGvlgQfFObY3OVetW7XGGO8jomBKaMr6V3Jr7+8Ms4mCAillFKJC4lz4XAmIAiIgKjxYy/wF1BptW3inZJpAAAAAElFTkSuQmCC';
    var path='C:/Program Files/Pidgin/pidgin.exe';
    //var path='c:/windows/explorer.exe';
    var args='';
      this.label=label;
      this.setAttribute('oncommand','this.startProcess("'+path+'","'+args+'")');
      this.image=img;
      this.tooltipText = label;
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
    // file.launch();
     process.init(file);
     process.run(false,[args],1); 
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/pidgin-launch-snwbdr987.html');

    Help Tab

  381. Platypus

    Code Tab

    this.plattog(event);
    return;

    Initialization Tab

    /*Initialization Code*/
    this.plattog=function(evt)
    {
    start_platypus_toolbar();
    }
    this.img1 = this.image;
    this.img2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAXCAYAAAAV1F8QAAAAB3RJTUUH1gcaAgsEYir3xQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAARnQU1BAACxjwv8YQUAAASvSURBVHjapZVdaBxVFMf%2Fd%2BbOx85u0nxumw%2BwWBEsJlZjNCkuEX01qfStL%2FqUiC8G0qShqAhaFQriY%2F0AQ7DFB1%2Fsmoe2NKBUGjBqU1cJ0RgUTQ0xSZfdZHdnd2fGc%2B5sEsVgrDlw9s7O3vv%2FnXPuuXcFtq2OvIY8Rm5gb1YiXydPk6%2FxC8EfLS0trX19fSc1TXs6nU4fzGQye6JUV1ejpqbmZ9%2F3P0kmk28tLi7%2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7%2B%2BBRuXhO1ZWRm2HcQtEOqxhF0NN1bHEoPMmQ5DOh5ZS1pgj8MsHp9VEjX7Q6O%2BCn8O%2FhNC4YbizAiJ5vk%2FPoWs0hzW4DzYDYIbUdT3f2NgYmMXbQjOqQPuNjpNn6W9i9%2FtuJwsIsrFBEMqINMHazOCMZtva2rp%2FnL9s%2BIf7IWOcKk2kOmviziB8Gft0qUpa52fJ5y%2BDtMvMoEzFZCKRKBhrs4E39Q7szDxi1R5isQBO9M6c1%2FBa1mAt1mRtZgiqtfA873QqlXr5i2vXzJmZm9ryH8v%2Fr24VizfGceTIA%2F5jiUSRMnqNSvemqGwsjydoM3tpPEp%2BYE8kYIn8OjXQpzR%2BRBkFfwLxZvPL67mn5QAAAABJRU5ErkJggg%3D%3D";
    this.setAttribute("onmouseover", "this.image = this.img2");
    this.setAttribute("onmouseout", "this.image = this.img1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/platypus.html');

    Help Tab

  382. play

    Code Tab

    foxytunesDispatchPlayerCommand('Play', true);

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/foxytunes-button-group.html');

    Help Tab

  383. Play Images

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if(typeof webdeveloper_about != "function") {
      this.setAttribute("oncommand","alert('Web Developer extensions is not installed or is disabled.');");
      return;
    }
    this.onImage=this.image;
    this.offImage='data:image/gif;base64,R0lGODlhEwAQAPcAADEwMbWytaWipXNxc8bDxpyanAAEABAUEFJVUlpdWmNlY3N1c5SWlISGhM7PzrW2tcDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAABIDRQAAAAUAJh4FQCk+BIAAAAAAOj6EgAY7pB8OAeRfP////8yB5F8qwaRfOsGkXwAAAAAAAAAALhzSADWhNda+PgSAAAAAADIBZF8cL0YAMT5EgBRBZF8eAcUAG0FkXyYvRgAeL0YALS9GADIAxQAgAAAADj5EgDwAxQAaCRmAOz////wAxQARQmRfE4JkXxovRgACQAAAEj6EgAEAAAAkEGRfFz5EgAAAAAAyAWRfHigFQAo+hIAcPkSAAAAAADIBZF8mL0YADz6EgBRBZF82AcUAG0FkXy0vRgAoL0YAAAAAAAAABQAYLsYAAAAAABPAAAAGwAAAAIAAAA2AAEABQAAAAj5EgAFAAAA8PkSABjukHxwBZF8/////20FkXxiGZF8kxmRfIDAl3xwGZF8mL0YADgAAAC0vRgAAND9f9j5EgDwAxQANPoSABjukHx4GZF8/////3AZkXwAABQAAhmRfLS9GACgvRgAAAAAAGi5GADIwAEABwAAAID5EgAAAAAAgPoSABjukHxwBZF8/////20FkXxb8IB8AAAUAAAAAABn8IB8pNjUdwAAAAABAAAAAND9fwAAAAAAAAAAEAEAAKC9GABPAFMAAAAAAFD6EgAuAEcAsP8SAPOZg3xw8IB8/////2fwgHwkAAAAoL0YAKTY1HcAAAAAIAAAAGjJVfp8scYBxGKw+nyxxgHEYrD6fLHGAQAAAAAAAAAAmHgVAPohBPBDbG9zIAEAAGUuAGkAABQA2PgSAAEAAAA0+xIAGO6QfPAGkXz/////6waRfA+agHwAABQACAAUACCagHyk2NR3AAAAAAAAAAAAAAAAAAAAAPTCRACweBUA9DcXALR4FQDUc0gA/////5h4FQBew0QAsHgVACH5BAEAABAALAAAAAATABAAQAhlACEIHEiwoEGBChQ0YMCQQQMEABAIOEixIsEGEBBohADAokeLDhwEEEDygAEDDA4CAKAAwEIGEBGg/Eizps2PMA+sRMAQZMifAWAa4Gkw4UuGDyNONNhAgUmdAAyYVJDyptWDAQEAOw==';
    this.pref=0;
    this.hideImages=function(toggle_value)
    {
    	if(toggle_value==1)
    	{
    		this.pref=0;this.checked=false;this.image=this.onImage;
    		webdeveloper_hideImages(this,'webdeveloper-hide-images',true);
    	}
    	else
    	{
    		this.pref=1;this.checked=true;this.image=this.offImage;
    		webdeveloper_hideImages(this,'webdeveloper-hide-images',false);
    	}
    }
    this.makeImagesInvisible=function(toggle_value)
    {
    	if(toggle_value==1)
    	{
    		this.pref=0;this.checked=false;this.image=this.onImage;
    		webdeveloper_makeImagesInvisible(this,'webdeveloper-make-images-invisible',true);
    	}
    	else
    	{
    		this.pref=1;this.checked=true;this.image=this.offImage;
    		webdeveloper_makeImagesInvisible(this,'webdeveloper-make-images-invisible',true);
    	}
    }
    this.disableAllImages=function(toggle_value)
    {
    	if(toggle_value==1)
    	{
    		this.pref=0;this.checked=false;this.image=this.onImage;
    		webdeveloper_toggleImages(this);
    	}
    	else
    	{
    		this.pref=1;this.checked=true;this.image=this.offImage;
    		webdeveloper_toggleImages(this);
    	}
    }
    this.disableImageAnimation=function(toggle_value)
    {
    	if(toggle_value==1)
    	{
    		this.pref=0;this.checked=false;this.image=this.onImage;
    		webdeveloper_toggleImageAnimations(this);
    	}
    	else
    	{
    		this.pref=1;this.checked=true;this.image=this.offImage;
    		webdeveloper_toggleImageAnimations(this);
    	}
    }
    this.toggle=this.hideImages;
    //--------------------------------------------------------------------------------------------------------------
    var apps=new Array;
    //------menu items--------
    apps.push(['Hide Images']);
    apps.push(['Make Images Invisible']);
    apps.push(['Disable All Images']);
    apps.push(['Disable Image Animation']);
    //apps.push(['separator']);
    //------/menu items-------
    var i=0;
    var nMItem=function(label,value,obj){
    var re=document.createElement('menuitem');
    re.setAttribute('type','radio');
    re.setAttribute('label',label);
    re.setAttribute('value',value);
    re.tooltipText = label;
    return re;
    }
    var mP=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mP.appendChild(document.createElement('menuseparator'));
     }else{
      mP.appendChild(nMItem(apps[i] [0],i+1,this));
     }
    }
    this.switchToggle=function(fun_type)
    {
    	if (fun_type==1)
    	{
    		this.toggle=this.hideImages;
    	}
    	else if (fun_type==2)
    	{
    		this.toggle=this.makeImagesInvisible;
    	}
    	else if (fun_type==3)
    	{
    		this.toggle=this.disableAllImages;
    	}
    	else if (fun_type==4)
    	{
    		this.toggle=this.disableImageAnimation;
    	}
    }
    this.go=function(event){
    	if(event.target.value>=1)
    	{
    		this.switchToggle(event.target.value);
    	}
    	switch(this.pref){
    		case 1: this.toggle(1);break;
    		case 0: this.toggle(0);break;
    	}
    }
    this.setAttribute("oncommand", "this.go(event);");
    this.appendChild(mP);
    this.type='menu-button';
    this.value=-1;
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','20060814.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/play-images.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

  384. Play Sound at Startup

    Code Tab

    /* ----------------------------------------------------------------
         Play Sound at Startup
         by LouCypher (aka Zoolcar9)
       ---------------------------------------------------------------- */
    playSound(getSoundFile());
    

    Initialization Tab

    var Cc = Components.classes;
    var Ci = Components.interfaces;
    this.prefString = "custombuttons.playSound.filename";
    this.buttonPref = Cc["@mozilla.org/preferences-service;1"]
                           .getService(Ci.nsIPrefBranch);
    this.tooltipText = "Select sound file to play at startup";
    this.getSoundFile = function() {
      const nsIFilePicker = Ci.nsIFilePicker;
      var fp = Cc["@mozilla.org/filepicker;1"]
                  .createInstance(nsIFilePicker);
      fp.init(window, this.tooltipText, nsIFilePicker.modeOpen);
      fp.appendFilter("*.wav", "*.wav");
      fp.appendFilters(nsIFilePicker.filterAll);
      if (fp.show() == nsIFilePicker.returnCancel) return;
      this.buttonPref.setCharPref(this.prefString, fp.fileURL.spec);
      return fp.fileURL.spec;
    }
    this.playSound = function(aSoundFile) {
      if (!aSoundFile) return;
      var gSound = Cc["@mozilla.org/sound;1"].createInstance();
      if (gSound) gSound.QueryInterface(Ci.nsISound);
      gSound.init();
      var ioService = Cc["@mozilla.org/network/io-service;1"].
                          getService(Ci.nsIIOService);
      var url = ioService.newURI(aSoundFile, null, null);
      gSound.play(url);
    }
    var thisButton = document.getElementById(this.id);
    window.setTimeout(function() {
      var soundURL;
      try {
        soundURL = thisButton.buttonPref.getCharPref(thisButton.prefString);
      } catch(ex) {
        thisButton.playSound();
      }
      thisButton.playSound(soundURL);
    }, 9000) //adjust the number to match your Firefox startup speed
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/play-sound-startup.html');
    this.setAttribute("onclick",
                      "if (event.button == 1) " +
                      "this.playSound(this.buttonPref." +
                      "getCharPref(this.prefString));");
    

    Help Tab

  385. Popup Toolbar

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    var popupToolbarName = "";
    var popupToolbarId = "";
    var popupId = "";
    var contextPopupId = "popuptoolbar-contextpopup";
    this.type = "menu";
    this._init = function() {
      popupToolbarName = this.label;
      popupToolbarId = "__customToolbar_" + popupToolbarName.replace(" ", "_");
      popupId = popupToolbarName.replace(" ", "").toLowerCase() + "-" + this.type + "popup";
      var popupToolbar = document.getElementById(popupToolbarId);
      if (popupToolbar) {
        popupToolbar.setAttribute("collapsed", "true");
        document.persist(popupToolbarId, "collapsed");
      }
      var popup = document.getElementById(popupId);
      if (popup) {
        popup.hidePopup();
        popup.parentNode.removeChild(popup);
      }
      popup = document.getElementById("mainPopupSet").appendChild(document.createElement("menupopup"));
      popup.setAttribute("id", popupId);
      popup.setAttribute("position", "after_start");
      if (this.type == "menu") {
        while (this.firstChild && this.firstChild.localName == "menupopup") {
          this.firstChild.hidePopup();
          this.removeChild(this.firstChild);
        }
        this.appendChild(popup);
        popup.setAttribute("onpopupshowing", 'this.parentNode.setPopup(event);');
      }
      else {
        popup.setAttribute("onpopupshowing", 'document.popupNode.setPopup(event);');
      }
      popup.setAttribute("onpopupshown", '{\
        window.addEventListener("popuphidden", function(e) {\
          var popup = document.getElementById(popupId);\
          if (e.target == popup) {\
            window.removeEventListener("popuphidden", arguments.callee, false);\
            return;\
          }\
          var popupNode = document.popupNode;\
          while (popupNode && popupNode != popup) popupNode = popupNode.parentNode;\
          if (popupNode == popup) popup.hidePopup();\
        }, false);\
      }'.replace("popupId", '"' + popupId + '"'));
      popup.setAttribute("onpopuphidden", '{\
        var popup = event.target;\
        if (popup.firstChild && popup.firstChild.localName == "toolbar") {\
          var popupToolbar = popup.firstChild;\
          popupToolbar.removeAttribute("style");\
          popupToolbar.setAttribute("collapsed", "true");\
          document.persist(popupToolbar.id, "collapsed");\
          var navbox = document.getElementById("navigator-toolbox");\
          var nextElement = navbox.firstChild;\
          while (nextElement && nextElement.localName != "toolbarset") {\
            if (Number(nextElement.getAttribute("customindex")) > Number(popupToolbar.getAttribute("customindex")))\
              break;\
            nextElement = nextElement.nextSibling;\
          }\
          navbox.insertBefore(popupToolbar, nextElement);\
          popupToolbar.firstPermanentChild = null;\
          popupToolbar.lastPermanentChild = null;\
          popupToolbar.currentSet = popupToolbar.getAttribute("currentset");\
        }\
        while (popup.lastChild && popup.lastChild.localName == "menuitem")\
          popup.removeChild(popup.lastChild);\
      }');
      var contextPopup = document.getElementById(contextPopupId);
      if (contextPopup) {
        contextPopup.hidePopup();
        contextPopup.parentNode.removeChild(contextPopup);
      }
      contextPopup = document.getElementById("mainPopupSet").appendChild(document.createElement("menupopup"));
      contextPopup.setAttribute("id", contextPopupId);
      contextPopup.setAttribute("position", "at_pointer");
      contextPopup.setAttribute("onpopupshowing", 'document.popupNode.setContextPopup(event);');
      var menuitem = document.createElement("menuitem");
      menuitem.setAttribute("label", "Show Context Menu With Toolbar");
      menuitem.setAttribute("type", "checkbox");
      menuitem.setAttribute("checked", this.getBoolPref('showContextWithToolbar'));
      menuitem.setAttribute("oncommand", "document.popupNode.setBoolPref('showContextWithToolbar', this.getAttribute('checked') == 'true');");
      contextPopup.appendChild(menuitem);
      contextPopup.appendChild(document.createElement("menuseparator"));
      this.tooltipText = this.label;
    }
    this.setBoolPref = function(name, value) {
      var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
      prefs.setBoolPref("custombuttons.popuptoolbar." + name, value);
    }
    this.getBoolPref = function(name) {
      var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
      return prefs.getPrefType("custombuttons.popuptoolbar." + name)
            && prefs.getBoolPref("custombuttons.popuptoolbar." + name);
    }
    this.setPopup = function(event) {
      if (this.getBoolPref('showContextWithToolbar')) {
        document.popupNode = this;
        this.setContextPopup(event);
      }
      var popup = event.target;
      var popupToolbar = document.getElementById(popupToolbarId);
      if (popupToolbar && popupToolbar.parentNode != popup && this.parentNode != popupToolbar) {
        popup.insertBefore(popupToolbar, popup.firstChild);
        popupToolbar.setAttribute("collapsed", "false");
        if (!this.getBoolPref('showContextWithToolbar'))
          popupToolbar.setAttribute("style", "border: none !important;");
      }
      if (!popup.firstChild) {
        document.popupNode = this;
        this.setContextPopup(event);
      }
    }
    this.setContextPopup = function(event) {
      var contextPopup = event.target;
      while (contextPopup.lastChild && contextPopup.lastChild.localName == "menuitem")
        contextPopup.removeChild(contextPopup.lastChild);
      var toolbars = document.getElementById("navigator-toolbox").getElementsByTagName("toolbar");
      for (var i=0; i<toolbars.length; i++) {
        var toolbarname = toolbars[i].getAttribute("toolbarname");
        var toolbarid = toolbars[i].getAttribute("id");
        var menuitem = contextPopup.appendChild(document.createElement("menuitem"));
        menuitem.setAttribute("label", toolbarname);
        menuitem.setAttribute("type", "radio");
        menuitem.setAttribute("name", "toolbars-radio");
        menuitem.setAttribute("checked", (this.label == toolbarname));
        menuitem.setAttribute("disabled", ("__customToolbar_" + toolbarname.replace(" ", "_") != toolbarid) || (this.parentNode == toolbars[i]));
        menuitem.setAttribute("oncommand", "document.popupNode.setToolbar(this.label.toString());");
      }
    }
    this.setToolbar = function(toolbarname) {
      var toolbar = document.getElementById("__customToolbar_" + toolbarname.replace(" ", "_"));
      if (toolbar && toolbar != this.parentNode) {
        this.label = toolbarname;
        if (toolbar.firstChild && toolbar.firstChild.image)
          this.image = toolbar.firstChild.image;
        this._init();
      }
    }
    var that = this;
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 10);
      }
    }
    this.showPopup = function(event) {
      document.popupNode = this;
      document.getElementById(popupId).showPopup(this, -1, -1, "popup", "bottomleft", "topleft");
    }
    this.showContextPopup = function(event) {
      document.popupNode = this;
      document.getElementById(contextPopupId).showPopup(this, event.screenX, event.screenY, "context", "none", "none");
    }
    this.leftclick = this.showPopup;
    this.rightclick = this.showContextPopup;
    if (this.type == "menu") {
      this.leftclick = this.hideDropMarker;
      this.hideDropMarker();
    }
    this._init();
    this.setAttribute('onclick', 'if (event.target == event.currentTarget) gQuot(event, this);');
    this.setAttribute('author','ithinc');
    this.setAttribute('version','20080322.05');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/popup-toolbar.html');
    this.setAttribute('dependency','FF2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    

    Help Tab

  386. Prevous Track

    Code Tab

    foxytunesDispatchPlayerCommand('Previous', true);

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/foxytunes-button-group.html');

    Help Tab

  387. Print, Page Setup & Print Preview All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    document.getElementById('cmd_print').click();
    }
    this.midclick = function(e) {
    document.getElementById('cmd_pageSetup').click();
    }
    this.rightclick = function(e) {
    document.getElementById('cmd_printPreview').click();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Print|M: Page Setup|R: Print Preview";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/print-page-setup-print-preview-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    L = Print current Page 
     R = Print Preview 
     M or Shift+click = Custom Button Context
  388. Print/Print Preview

    Code Tab

    /*Code*/

    Initialization Tab

    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
      this.disable(true);
    }
    var cb=custombuttons,self=this,lang=cb.getPref("general.useragent.locale");
    lang = lang.replace("-", "_");
    function l(str) {
      self.properties = {
        en_US:{      // English US translation by nicholas
          Label:       '%1/%2',
          Print_1:     'Print',
          PrintP_2:    '%1 Preview',
          Left:        'L',
          Right:       'R',
          Help:        ''
        },
        ja:{         // Japanese translation by nicholas
          Label:       '%1/%2',
          Print_1:     '印刷',
          PrintP_2:    '%1プレビュー',
          Left:        '左',
          Right:       '右',
          Help:        ''
        },
        fr:{         // French Translation by Goofy
          Label:       '%1/%2',
          Print_1:     'Imprimer',
          PrintP_2:    'Aperçu avant impression',
          Left:        'G',
          Right:       'D',
          Help:        ''
        },
        nl:{         // Dutch Translation by markh
          Label:       '%1/%2',
          Print_1:     'Afdrukken',
          PrintP_2:    'Afdrukvoorbeeld',
          Left:        'L',
          Right:       'R',
          Help:        ''
        },
        sv_SE:{      // Swedish Translation by anonymous
          Label:       '%1/%2',
          Print_1:     'Skriv ut',
          PrintP_2:    'Förhandsgranska',
          Left:        'V',
          Right:       'L',
          Help:        ''
        },
        es_ES:{      // Spanish (Spain) Translation by nicholas
          Label:       '%1/%2',
          Print_1:     'Imprimir',
          PrintP_2:    'Vista Preliminar',
          Left:        'I',
          Right:       'D',
          Help:        ''
        },
        es_AR:{      // Spanish (Argentina) Translation by nicholas
          Label:       '%1/%2',
          Print_1:     'Imprimir',
          PrintP_2:    'Vista Previa',
          Left:        'I',
          Right:       'D',
          Help:        ''
        }
      };
      var tstr = cb.getLocalString(self, str);
      // Operations to handle replacements
      if (tstr.match(/[%]\w{1}/g)) {
        for(prop in self.properties[lang]) {
          if ((prop.match(/[_]\w{1}$/)) && ((prop.substr(prop.lastIndexOf("_")+1)) == (tstr.substring(tstr.indexOf("%")+1, tstr.indexOf("%")+2)))) {
            var tok = tstr.substring(tstr.indexOf("%"), tstr.indexOf("%")+2);
            tstr = tstr.replace(tok, l(prop));
          }
        }
      }
      return tstr;
    }
    this.leftclick = function(evt) {
      PrintUtils.print();
    }
    this.rightclick = function(evt) {
      PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview);
    }
    this.tooltipText = l('Left')+": "+l('Print_1')+"\n"+l('Right')+": "+l('PrintP_2');
    this.label = l('Label');
    this.setAttribute("Help", l('Help'));
    this.setAttribute('onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.setAttribute('ondblclick', 'custombuttons.gQuot.mHandler( event, this )');
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20090322.01');                                                 	// Stores Version.
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/printprint-preview.html');

    Help Tab

  389. Print/Save/Print Preview

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler -------------------*/
    this.leftclick   = function(evt){
    	goDoCommand('cmd_print');
    }
    this.midclick    = function(evt){
    	saveDocument(window.content.document);
    }
    this.rightclick  = function(evt){
    	goDoCommand('cmd_printpreview');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*------------------ uncomment to show mouseover effects --------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20090101');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/print-print-preview-thunderbird.html');
    this.setAttribute('dependency','TB3.0.*,  TB2.0*, CB2 2.0.9.51*');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    //this.tooltipText = ' L: Print  M: Save  R: Preview ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    /*------------------------- Tooltip Block Start ------------------------------*/
    // ver 20090101.0200
    var sp = " ";  // hard space
    let cr = " ";  // hard space
       cr = (custombuttons.compareVersion( custombuttons.gAppVersion(), "3*" ) >= 0)? "\n " : cr ;   
    // Delete any unused lines.
    var ttip = " L:    Print "
        +cr+sp+" M:    Save as: "
        +cr+sp+" R:    Print Preview ";
    this.tooltipText += sp+cr+sp+ttip+sp+sp;
    /*--------------------------- Tooltip Block End ------------------------------*/
    

    Help Tab

    Help%3A%0A%0A%0A%20%20%20%20%20Left-click%3A%20%20Print%0A%20%20%20%20%20Middle-click%3A%20%20Save%0A%20%20%20%20%20Right-click%3A%20%20Print%20Preview%0A%20%20%20%20%20%0A%20%20%20%20%20Shift%20+%20Right-click%3A%20%20CustomButtons%B2%20context%20menu%0A%20%20%20%20
  390. PrismSearch

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
    var ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
    var kw	= prompt("Search keyword:");
    if (kw){
    var engine = ss.getEngineByName("Filecrop");
    var submission = engine.getSubmission(kw, null);
    openUILinkIn(submission.uri.spec, "tab", null, submission.postData); 
    var engine = ss.getEngineByName("Filespump");
    var submission = engine.getSubmission(kw, null);
    openUILinkIn(submission.uri.spec, "tab", null, submission.postData); 
    var engine = ss.getEngineByName("Filestube");
    var submission = engine.getSubmission(kw, null);
    openUILinkIn(submission.uri.spec, "tab", null, submission.postData); 
    var engine = ss.getEngineByName("Katz");
    var submission = engine.getSubmission(kw, null);
    openUILinkIn(submission.uri.spec, "tab", null, submission.postData); 
    }
    };
    this.sleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftLftClick);  // Replace with call of your choice
    };
    this.aleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltLftClick);  // Replace with call of your choice
    };
    this.cleftclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlLftClick);  // Replace with call of your choice
    };
    this.midclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysMdClick);  // Replace with call of your choice
    };
    this.smidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftMdClick);  // Replace with call of your choice
    };
    this.amidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltMdClick);  // Replace with call of your choice
    };
    this.cmidclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlMdClick);  // Replace with call of your choice
    };
    this.rightclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Replace with call of your choice
    };
    this.arightclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltRtClick);  // Replace with call of your choice
    };
    this.crightclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlRtClick);  // Replace with call of your choice
    };
    this.leftDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysLftDClick);  // Replace with call of your choice
    };
    this.sleftDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftLftDClick);  // Replace with call of your choice
    };
    this.aleftDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltLftDClick);  // Replace with call of your choice
    };
    this.cleftDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlLftDClick);  // Replace with call of your choice
    };
    this.midDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysMdDClick);  // Replace with call of your choice
    };
    this.smidDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftMdDClick);  // Replace with call of your choice
    };
    this.amidDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltMdDClick);  // Replace with call of your choice
    };
    this.cmidDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlMdDClick);  // Replace with call of your choice
    };
    this.rightDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysRtDClick);  // Replace with call of your choice
    };
    this.srightDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysShiftRtDClick);  // Replace with call of your choice
    };
    this.arightDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysAltRtDClick);  // Replace with call of your choice
    };
    this.crightDclick = function(evt)
    {
      Msg.aMsg(Cb2s.sNBkeysCtrlRtDClick);  // Replace with call of your choice
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','kmc');
    this.setAttribute('version','0.1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/prismsearch.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  391. Private Data Dialog

    Code Tab

    /*Code*/

    Initialization Tab

    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    this.leftclick = function(evt) {
      document.getElementById('sanitizeItem').click();
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081113.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/paranoid-button-private-data-dialog.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    It will clear all private data without prompt as long as you have the, "Ask me before clearing private data" option set to "unchecked".
    It will only clear the stuff you have set to checked in the "Clear Private Data" Dialogue. If you don't have anything checked there, then it won't clear anything.
  392. Profile

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.onClick = function(evt) {
      switch(evt.button) {
        case 0:
          var openProfileFolder = {
        open: function() {
     var directoryService =
    Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsIProperties);
     var profileFolder = directoryService.get('ProfD', Components.interfaces.nsIFile);
     this.runApplication(profileFolder.QueryInterface(Components.interfaces.nsILocalFile).path);
        },
        runApplication: function(aFolder) {
     var fileLocal = Components.classes["@mozilla.org/file/local;1"].getService(Components.interfaces.nsILocalFile);
     fileLocal.initWithPath(aFolder);
     fileLocal.launch();
        }
    }
    openProfileFolder.open();
          break;
        case 2:
          var popup = document.getElementById("custombuttons-contextpopup");
          var x = this.boxObject.x;
          var y = this.boxObject.y + this.boxObject.height;
          document.popupNode = this;
          popup.showPopup(this, x, y, "popup", null, null);
      }
    }
    this.setAttribute("context", "");
    this.setAttribute("onclick", "this.onClick(event)");
    // Profile
    // data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAB3RJTUUH1gYeARID1wrLwAAAAAlwSFlzAABOIAAATiABFn2Z3gAAAARnQU1BAACxjwv8YQUAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAACJJREFUeNpj+P+f4V89wx97EAIyPp8HoY/9IPSBHx39/w8AMZMV6xDQTPEAAAAASUVORK5CYII=
    /*Code*/
    // =============================================================================
    /*Initialization code*/
    this.onClick = function(evt) {
      switch(evt.button) {
        case 0:
          var openProfileFolder = {
        open: function() {
     var directoryService =
    Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsIProperties);
     var profileFolder = directoryService.get('ProfD', Components.interfaces.nsIFile);
     this.runApplication(profileFolder.QueryInterface(Components.interfaces.nsILocalFile).path);
        },
        runApplication: function(aFolder) {
     var fileLocal = Components.classes["@mozilla.org/file/local;1"].getService(Components.interfaces.nsILocalFile);
     fileLocal.initWithPath(aFolder);
     fileLocal.launch();
        }
    }
    openProfileFolder.open();
          break;
        case 2:
          var popup = document.getElementById("custombuttons-contextpopup");
          var x = this.boxObject.x;
          var y = this.boxObject.y + this.boxObject.height;
          document.popupNode = this;
          popup.showPopup(this, x, y, "popup", null, null);
      }
    }
    this.setAttribute("context", "");
    this.setAttribute("onclick", "this.onClick(event)");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','snwbdr987');
    this.setAttribute('version','20061022');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/profile-button-snwbdr987.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  393. Prompt Box Demo

    Code Tab

    var cbTitle = "My Title"; // Title of the prompt
    var cbDesc = "My Description/Instructions"; // Instructions/Info just before the input box
    var cbDefVal = "Default Value"; // Default value to place in the input box
    var cbPrompt = custombuttons.promptBox(cbTitle, cbDesc, cbDefVal);
    if (cbPrompt[0] == false) alert('cancel'); // first item in array was false
    else alert(cbPrompt[1]); // first item in array was NOT false

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081210.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  394. Prompt Box Demo (with checkbox)

    Code Tab

    var cbTitle = "My Title"; // Title of the prompt
    var cbDesc = "My Description/Instructions"; // Instructions/Info just before the input box
    var cbDefVal = "Default Value"; // Default value to place in the input box
    var cbCkTxt = "Remember this choice?"; // Text for placing with checkbox
    var cbCheck = {value:true,prompt:cbCkTxt} // value can be changed to default the checkmark to checked/unchecked
    var cbPrompt = custombuttons.promptBox(cbTitle, cbDesc, cbDefVal, cbCheck);
    if (cbPrompt[0] == false) alert('cancel'); // first item in array was false
    else {
      // the check is done inside this statement to avoid running it when cancel is pressed
      if (cbCheck.value == true) alert("ok we'll remember"); // the check returns either true or false
      if (cbCheck.value == false) alert("ok we'll forget"); 
      alert(cbPrompt[1]); // first item in array was NOT false
    }

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081210.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  395. Proxy

    Code Tab

    switch(this.PS.getIntPref(this.pref)){
    	case 1: this.PS.setIntPref(this.pref,0);break;
    	case 0: this.PS.setIntPref(this.pref,1);break;
    }

    Initialization Tab

    this.pref='network.proxy.type';
    this.onImage='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAG1BMVEUA/wCIiIgAAADd3d3///8AAICAAAD/AAAAAP8pkhnQAAAAAXRSTlMAQObYZgAAAF1JREFUeF4tyUERg0AQRNEJDjprAAYFQztYCglYWAlwzi2y053kn17Vj4AK9djJmo3jPP94exqv7zR6prFXvy8D+AG59DGExiJpoKC0gFQ9pmxUzwhNbqsBJ2iq+QNw+RI4rlZUrAAAAABJRU5ErkJggg==';
    this.offImage=this.image;
    this.setState=function(){
     var state=this.PS.getIntPref(this.pref);
     if (state==1){
      this.image=this.onImage;
      this.checked=true;
     }else{
      this.image=this.offImage;
      this.checked=false;
     }
    }
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/proxy-button-yan.html');

    Help Tab

  396. QuickNote

    Code Tab

    QuickNote_openQuickNote();

    Initialization Tab

    if(typeof QuickNote_openQuickNote != "function") {
      var ext = "QuickNote";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.bottomPanel = function(url, contextmenu) {
      var prefBranch = "custombuttons.bottomPanel."
      if(!url) {
        try {
          url = gPrefService.getCharPref(prefBranch + "url");
        } catch(ex) {
          url = "";
        }
      }
      if(url == gURLBar.value && !url.match(/^\w+?\:/)) url = "http://" + url;
      var panelID = "bottom-panel";
      var gPanel = document.getElementById(panelID);
      var height;
      try {
        height = gPrefService.getIntPref(prefBranch + "height");
      } catch(ex) {
        height = 300;
      }
      if(gPanel) {
        if(gPanel.firstChild.getAttribute("src").indexOf(url) != 0) {
          gPanel.firstChild.setAttribute("src", url);
          if(contextmenu)
            gPanel.setAttribute("contextmenu", contextmenu);
          else
            gPanel.removeAttribute("contextmenu");
        } else {
          gPrefService.setIntPref(prefBranch + "height", gPanel.height);
          gPanel.parentNode.removeChild(gPanel.previousSibling);
          gPanel.parentNode.removeChild(gPanel);
        }
      } else {
        var tbb = document.createElement("toolbarbutton");
            tbb.className = "tabs-closebutton";
            tbb.style.cursor = "pointer";
            tbb.setAttribute("oncommand",
              "gPrefService.setIntPref('custombuttons.bottomPanel.height', " +
              "this.parentNode.nextSibling.height); " +
              "this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); " +
              "this.parentNode.parentNode.removeChild(this.parentNode)");
        var spr = document.createElement("spacer");
            spr.setAttribute("flex", 1);
        var spl = document.createElement("splitter");
            spl.height = "28px";
            spl.appendChild(spr);
            spl.appendChild(tbb);
        var ifr = document.createElement("iframe");
            ifr.setAttribute("flex", 1);
            ifr.setAttribute("src", url);
            ifr.setAttribute("tooltip", "aHTMLTooltip");
        var box = document.createElement("box");
            box.id = panelID;
            box.height = height;
            box.appendChild(ifr);
        if(contextmenu) box.setAttribute("contextmenu", contextmenu);
        gBrowser.parentNode.appendChild(spl);
        gBrowser.parentNode.appendChild(box);
      }
      gPrefService.setCharPref(prefBranch + "url", url);
    }  
    var test = document.getElementById("cbContext-quicknote");
    if(test) test.parentNode.removeChild(test);
    this.onClick = function(evt) {
      if(evt.button==1) this.bottomPanel("chrome://quicknote/content/quicknote.xhtml");
    }
    var cbPopup = document.getElementById("custombuttons-contextpopup").cloneNode(true);
    var cbItems = cbPopup.childNodes.length;
    var subPopup = document.createElement("menupopup");
    subPopup.setAttribute("onpopupshowing", "event.stopPropagation();");
    for(var i = 0; i < cbItems; i++) {
      subPopup.appendChild(cbPopup.firstChild);
    }
    var subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.appendChild(subPopup);
    var qnpopup = document.createElement("popup");
    qnpopup.id = "cbContext-quicknote";
    var qnmenupopup = document.getElementById("quicknote-toolsmenu")
                        .getElementsByTagName("menupopup")[0];
    var qnpopupitems = qnmenupopup.childNodes;
    for(var i = 0; i < qnmenupopup.childNodes.length; i++) {
      var qnitem = qnpopupitems[i].cloneNode(true);
      qnpopup.appendChild(qnitem);
    }
    qnpopup.appendChild(document.createElement("menuseparator"));
    qnpopup.appendChild(subMenu);
    var mainpopup = document.getElementById("mainPopupSet");
    mainpopup.appendChild(qnpopup);
    this.setAttribute("context", qnpopup.id);
    this.setAttribute("onclick", "this.onClick(event)");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/quicknotes-button.html');

    Help Tab

  397. Quicknote/Metapad

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	QuickNote_qnCopyTo();
    }
    this.midclick    = function(evt){
    	this.startProcess('c:/program files/metapad/metapad.exe'); 
    }
    this.rightclick  = function(evt){
    	QuickNote_openQuickNote();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*------------------ un-comment to show mouseover effects -------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25, SSClockDr, others');
    this.setAttribute('version','20071116.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/quicknote-metapad.html');
    this.setAttribute('dependency','QuickNote, Metapad');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText += '\n L: Send to QuickNote | M: Open Metapad | R: Open QuickNote';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/%0A%0A%20%20%20%20%20Left-click%3A%20Send%20to%20QuickNote%0A%20%20%20%20%20Middle-click%3A%20Open%20Metapad%0A%20%20%20%20%20Right-click%3A%20Open%20QuickNote%0A%20%20%20%20%20Shift-Right-click%3A%20Context%20Menu%0A%20%20%20%20%20%0A%20%20%20%20%20Change%20the%20path%20for%20middle-click%20to%20point%20to%20any%20editor.
  398. QuickPrint

    Code Tab

    /*Code*/

    Initialization Tab

    var label='QuickPrint';
    var img='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP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Hefa/AW9nc3qXBQFspug7j3xHrh84ybraxe5duZS6wT/gUxlEBqiTpuVuM2j6w+YfH4PwILAsxev/NatrUX7h5DpjN3eJwgEr+Uu6X7K+O27ZYGDXz8JRbhswVlG05c8vTpkmu9h8ozfR1etvQ9f/MGPbwAYYxoeg84VJjDEGxEWix4bQhfSuXKf9vePE7bvbAOQpimyI5c0YhehtEK9UZjc0E36xBsx/f6AtnWW4rAAB0IIrLMNbRTEkSSOJGqskLEENzdGMzPgwOQGMROLE6AepwxGWGPRMz0n4MDmFiFE4whlMGrkrbW1A611SeYWlat/7oVWGls5COradVYKRVLSTSTaicpq9nyAGZfi0d0IAZj8aA+ss4igLkEEgtVTq4TBSYZD22i/KuHsuXW+TieomS77ENSJxhYkyZzw6dKR1gYCuHB+Dbz3S9EfDH0FV0bS7fum3MbfaB3cfphC404s4s8AyXb0BrAh5b4AAAAASUVORK5CYII=';
    var path='C:/QuickPrint.exe';
    //var path='c:/windows/explorer.exe';
    var args='';
      this.label=label;
      this.setAttribute('oncommand','this.startProcess("'+path+'","'+args+'")');
      this.image=img;
      this.tooltipText = label;
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
    // file.launch();
     process.init(file);
     process.run(false,[args],1);
     PrintUtils.print(1); 
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/quickprint-mrratburn.html');

    Help Tab

  399. Quit Firefox

    Code Tab

    goQuitApplication();

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'snwbdr');								// Stores Author.
    this.setAttribute("version",'20060712.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/quit-firefox-snwbdr.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    undefined
  400. Quote

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\n [qu'+'ote=Clipboard]Highlighted[/qu'+'ote]';
    this.ss = [
      { label: 'BBCode', open: '[qu'+'ote]'                                            , open1: '[quote="%c"]%h'                                                , close: '[/quote]'                 , sItemId: '' },
      { label: 'HTML'  , open: '<div class="content"><blockquote class="uncited"><div>', open1: '<div class="content"><blockquote><div><cite>%c wrote:</cite>%h', close: '</div></blockquote></div>', sItemId: '' },
      { label: 'WIKI'  , open: '>'                                                     , open1: '>%h'                                                           , close: ''                         , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.amidclick = function(evt)
    {};
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      initMeth  : function( oBtn ){
            this.index  = Number(Cb.getPref( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          if ( e.ctrlKey ) {
            if (!x.cBoard) {
              if ( !this.Select() ) return;
              x.cBoard = this.input.value;
            }
            x.text += x.liste.replace(/%c/,x.cBoard).replace(/%h/,'');
          } else {
            x.text += x.listo;
          }
          var nLen = x.text.length;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          if ( x.listc ) {
            this.pref=1;
            this.checked = true;
          }
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.n += x.liste.replace(/\=\"%c\"/,'').replace(/%h/g,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos + nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro
      if (!x.cBoard) {
        if ( !this.Select() ) return;
        x.cBoard = this.input.value;
      }
      if ( e.ctrlKey && x.index === 2 ) {
        this.processLines( e, x )
      } else {
        if (e.altKey) {
          x.n += x.liste.replace(/%c/,x.cBoard).replace(/%h/,x.Highlight)+ x.listc;
        } else {
          x.n += x.liste.replace(/%c/,x.Highlight).replace(/%h/,x.cBoard)+ x.listc;
        }
        var nLen = x.n.length;
        x.text += x.n;
        x.theBox.value = x.text + x.eBlock;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      } // End if ( e.ctrlKey )
    }; // End this.doMid
    this.processLines = function( e, x )
    {
      x.arr = (e.ctrlKey)? x.cBoard.split('\n') : [x.cBoard];
      x.n = ( x.index === 2 )? "" : x.listo;
      for (var i in x.arr) {
        if ( x.arr[i].length > 0 ) {
          x.n += x.liste.replace(/%h/,x.arr[i]);
          x.n += (i < x.arr.length-1 ) ? '\n' : "";
        } else {
          x.n += '\n';
        } // End if ( x.arr.length > 2 )
      } // End for
      x.n += ( x.cBoard.length > 0 ) ? x.listc : '';
      x.text += x.n;
      var nLen = x.text.length
      x.text += x.eBlock;
      x.theBox.value = x.text;
      x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
      x.arr =[];
    }; // End function this.processLines( e, x, sText )
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPref( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPref(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPref("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    this.Select = function (){
      this.input.value = '';
      var result = this.prompts.prompt(null, this.sTitle, this.sMsg, this.input, null, this.check);
      var x = this.input.value
      return result;
    };
    this.prompts  = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
          .getService(Components.interfaces.nsIPromptService);
    this.input  = {value: ''};
    this.check  = {value: false };
    this.sTitle  = 'Author?';
    this.sMsg  = 'Enter the Author\'s user name';
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    **************************************************************
     L = IF text is highlighted:
       BBCode: [quote]Highlighted[/quote]
       HTML: <tags style>Highlighted</blockquote>
       WIKI: >Highlighted
       OR nothing highlighted
         First click = [quote], <tags style>, or >
         Second click = [/quote], </blockquote>, or ''
     M =
       BBCode: [quote]Highlighted[/quote]
       HTML: <tags style>Highlighted</blockquote>
       WIKI: >Highlighted
     M+Ctrl in WIKI mode =
             >Clipboard
             >contents
     R = Context Menu with tag options and submenu for CB Context
  401. radio button dialogue demo button

    Code Tab

    /*
        This is very much like my checkbox dialogue demo button and this too can be classed as a demo button.
        Left click on the button to show the demo radio button dialogue.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    // This sets file to the profile directory
    var file = Components.classes["@mozilla.org/file/directory_service;1"]
                         .getService(Components.interfaces.nsIProperties)
                         .get("ProfD", Components.interfaces.nsIFile);
    // This is the array which our radio buttons will be based on.
    // The structure I'm using is: Arr[i] = [ID, Label, Selected];
    var Arr = new Array();
    Arr[0] = ["A", "Apple", false];
    Arr[1] = ["B", "Banana", true];
    Arr[2] = ["C", "Carrot", false];
    // (Initialising a couple of variables used later.)
    var WriteData = '';
    var XULData = '';
    /* 
      Below is the data that will be in the dialogues javascript file, it will look like this:
      function onOK() {
         window.arguments[0].out = {
            chosen:document.getElementsByAttribute("selected", true)
         };
         return true;
      }
    */
    var JSData = 'function onOK() {'+"\n"+'   window.arguments[0].out = {'+"\n"+'      chosen:document.getElementsByAttribute("selected", true)'+"\n"+'   };'+"\n"+'   return true;'+"\n"+'}';
    // ***** FUNCTIONS ***** //
    /* 
    The below function produces the data to be written into the dialogues XUL file. Radio buttons are added dynamically based on the contents of the array. It will look something like this (using the default array values):
      <?xml version="1.0"?>
      <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
      <dialog
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        id="myDialogId"
        title="My Dialog"
        ondialogaccept="return onOK();"
        onload="onLoad();"
        persist="screenX screenY width height"
        windowtype ="myDialogWindowType">
      <script type="application/x-javascript" 
               src="file:///C:\Documents and Settings\...\Application Data\Mozilla\Firefox\Profile\...\cb_demo_radio_button_dialog.js"/>
      <radiogroup>
          <radio id="A" selected="true" label="Apple"/>
          <radio id="B" selected="true" label="Banana"/>
          <radio id="C" selected="true" label="Carrot"/>
      </radiogroup>
      </dialog>
    */
    function GenerateXUL()
    {
      XULData = '<?xml version="1.0"?>'+"\n"+'<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>'+"\n"+'<dialog'+"\n"+'  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"'+"\n"+'  id="myDialogId"'+"\n"+'  title="My Dialog"'+"\n"+'  ondialogaccept="return onOK();"'+"\n"+'  persist="screenX screenY width height"'+"\n"+'  windowtype ="myDialogWindowType">'+"\n"+"\n"+'<script type="application/x-javascript" src="'+JSLocation+'"/>'+"\n"+'<radiogroup>'+"\n";
      var l = Arr.length;
      for (var i = 0; i < l; i++) {
        XULData = XULData + "\n"+'<radio id="'+Arr[i][0]+'" selected="'+Arr[i][2]+'" label="'+Arr[i][1]+'"/>';
      }
      XULData = XULData + "\n"+'</radiogroup>'+"\n"+"\n"+'</dialog>';
    }
    // This simply writes whatever is in the variable "WriteData" to the file referred to by the variable "file".
    function WriteFile()
    {
      // file is nsIFile, data is a string
      var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
                               .createInstance(Components.interfaces.nsIFileOutputStream);
      // use 0x02 | 0x10 to open file for appending.
      foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0); 
      // write, create, truncate
      // In a c file operation, we have no need to set file mode with or operation,
      // directly using "r" or "w" usually.
      foStream.write(WriteData, WriteData.length);
      foStream.close();
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt)
    {
      var params = {inn:null, out:null};
      var dlg = window.openDialog(location, "centersceen", "chrome, dialog, modal, resizable=no", params).focus();
      if (params.out) {
        alert('OK must have been pressed, because there was some output.');
    /* 
      This next section of code runs through the returned parameters and updates the array accordingly. It sets all the items in the array to 
      non-selected (Arr[k][2] = false;) except for the selected radio button, its selected property is set to true (Arr[n][2] = true;).
    */
        var pL = params.out.chosen.length;
        var aL = Arr.length;
        for (var k = 0; k < aL; k++) {
          Arr[k][2] = false;
        }
        for (var j = 0; j < pL; j++) {
          for (var n = 0; n < aL; n++) {
            if (Arr[n][0] == params.out.chosen[j].id) {
              Arr[n][2] = true;
            }
          }
        }
      }
      else {
        alert('Cancel (or close) must have been clicked, because there was no output.');
      }
    // This simply display the contents of the array.
      alert(Arr);
    // This re-writes the XUL file to reflect the changes to the array, so if you select a different radio button this will be reflected next time you open the dialogue.
      WriteData = '';
      GenerateXUL();
      file = Components.classes["@mozilla.org/file/directory_service;1"]
                       .getService(Components.interfaces.nsIProperties)
                       .get("ProfD", Components.interfaces.nsIFile);
      WriteData = XULData;
      file.append("cb_demo_radio_button_dialog.xul");
      location = "file:\/\/\/" + file.path;
      WriteFile();
    }
    // ***** INITIALISATION ***** //
    // Sets the file to be the dialogues JS file and writes it.
    file.append("cb_demo_radio_button_dialog.js");
    var JSLocation = "file:\/\/\/" + file.path;
    WriteData = JSData;
    WriteFile();
    // Sets the file to be the dialogues XUL file and writes it.
    WriteData = '';
    GenerateXUL();
    file = Components.classes["@mozilla.org/file/directory_service;1"]
                     .getService(Components.interfaces.nsIProperties)
                     .get("ProfD", Components.interfaces.nsIFile);
    WriteData = XULData;
    file.append("cb_demo_radio_button_dialog.xul");
    var location = "file:\/\/\/" + file.path;
    WriteFile();
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-rawny.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Left click on the button to show the demo radio button dialogue.
  402. Radiobox Dialog Demo Button (multi)

    Code Tab

    /*Code*/

    Initialization Tab

    var cbArr = [ [
      ["Apple", false],
      ["Banana", false],
      ["Carrot", false]
    ],[
      ["Coffee", false],
      ["Milk", false],
      ["Orange Juice", false]
    ] ];
    var cbTtl = "My Title"; // Title of the dialog
    var cbLbl = "My Label"; // Label for the radiobuttons area (displays above radiobuttons)
    var cbHed = "My Header"; // A Header Box that displays near the top of the dialog
    var cbDsc = "My Description"; // The description for the Header Box.
    var cbAcc = "Accept"; // The text to show on your OK button (OK is used when not specified)
    var cbCnl = "Don't Accept"; // The text to show on your cancel button (Cancel is used when not specified)
    var cbHlp = "Help"; // The text to show on your Help button (This button does not show if no label is specified)
    var hlpTp = "Select the food that you like,\\n then select the drink you like."; // Needed when clicking on the Help button
    var cbDis = "Disclosure"; // The text to show on your Disclosure button (This button does not show if no label is specified)
    var disTp = "Only use this button if you agree not to be stupid"; // Needed when clicking on the Disclosure button
    this.leftclick = function(evt) {
      // ********************* USAGE INFO ****************************** //
      // Any of the attributes in this function may be changed to null or removed if you don't want them
      // example: custombuttons.radioboxDialog(this,cbArr,null,null,cbHed,null...);
      // you must minimally use cus...(this,cbArr); you may also remove attributes completely,
      // but this requires that the order of the attributes is respected i.e.
      // custombuttons.radioboxDialog(this,cbArr,null,cbLbl); <-- notice all the missing attributes
      // *************************************************************** //
      var cbRadio = custombuttons.radioboxDialog(this,cbArr,cbTtl,cbLbl,cbHed,cbDsc,cbAcc,cbCnl,cbHlp,hlpTp,cbDis,disTp);
      if (cbRadio) {
        for(i = 0; i < cbArr.length; i++) {
          for(j = 0; j < cbArr[i].length; j++) {
            // this is where you can parse the array for all it's returned values
            alert(j + ": Do you like " + cbArr[i][j][0] + "s? " + cbArr[i][j][1]);
          }
        }
      }
      else { // cancel or close was clicked
        return;
      }
    }
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.setAttribute('author','Rawny,nicholas');
    this.setAttribute('version','20081105.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL1.0*, TB2.0*, CB2 2.0.7.7*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Left%20click%20on%20the%20button%20to%20show%20the%20demo%20checkbox%20dialog.
  403. Radiobox Dialog Demo Button (single)

    Code Tab

    /*Code*/

    Initialization Tab

    var cbArr = new Array();
    cbArr[0] = ["Apple", false];
    cbArr[1] = ["Banana", false];
    cbArr[2] = ["Carrot", false];
    var cbTtl = "My Title"; // Title of the dialog
    var cbLbl = "My Label"; // Label for the radiobuttons area (displays above radiobuttons)
    var cbHed = "My Header"; // A Header Box that displays near the top of the dialog
    var cbDsc = "My Description"; // The description for the Header Box.
    var cbAcc = "Accept"; // The text to show on your OK button (OK is used when not specified)
    var cbCnl = "Don't Accept"; // The text to show on your cancel button (Cancel is used when not specified)
    var cbHlp = "Help"; // The text to show on your Help button (This button does not show if no label is specified)
    var hlpTp = "Select the food that you like"; // Needed when clicking on the Help button
    var cbDis = "Disclosure"; // The text to show on your Disclosure button (This button does not show if no label is specified)
    var disTp = "Only use this button if you agree not to be stupid"; // Needed when clicking on the Disclosure button
    this.leftclick = function(evt) {
      // ********************* USAGE INFO ****************************** //
      // Any of the attributes in this function may be changed to null or removed if you don't want them
      // example: custombuttons.radioboxDialog(this,cbArr,null,null,cbHed,null...);
      // you must minimally use cus...(this,cbArr); you may also remove attributes completely,
      // but this requires that the order of the attributes is respected i.e.
      // custombuttons.radioboxDialog(this,cbArr,null,cbLbl); <-- notice all the missing attributes
      // *************************************************************** //
      var cbRadio = custombuttons.radioboxDialog(this,cbArr,cbTtl,cbLbl,cbHed,cbDsc,cbAcc,cbCnl,cbHlp,hlpTp,cbDis,disTp);
      if (cbRadio) {
        for(i = 0; i < cbArr.length; i++) {
          // this is where you can parse the array for all it's returned values
          alert(i + ": Do you like " + cbArr[i][0] + "s? " + cbArr[i][1]);
        }
      }
      else { // cancel or close was clicked
        return;
      }
    }
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.setAttribute('author','Rawny,nicholas');
    this.setAttribute('version','20081105.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL1.0*, TB2.0*, CB2 2.0.7.7*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Left%20click%20on%20the%20button%20to%20show%20the%20demo%20checkbox%20dialog.
  404. Re-Start

    Code Tab

    /*CODE*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg("...")"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.leftclick = function(evt){
      var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]
                                 .getService(Components.interfaces.nsIAppStartup);
      appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);
    };
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");  // Calls the Golbal MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = ".65";
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);");
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author","SCClockDr");
    this.setAttribute("version","20090209.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/re-start-button.html');
    this.setAttribute("dependency","FF2.0*, FL1.0*, TB2.0*, CB2 2.0*");
    this.setAttribute("status","Development");
    this.setAttribute("public",true);
    // this.tooltipText += "";
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    ***********************************************************************
      Left - Re-Start your Mozilla Application
  405. Re-Start

    Code Tab

    /*CODE*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg("...")"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.leftclick = function(evt){
      var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]
                                 .getService(Components.interfaces.nsIAppStartup);
      appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);
    };
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");  // Calls the Golbal MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = ".65";
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);");
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author","SCClockDr");
    this.setAttribute("version","20090209.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/re-start-button.html');
    this.setAttribute("dependency","FF2.0*, FL1.0*, TB2.0*, CB2 2.0*");
    this.setAttribute("status","Development");
    this.setAttribute("public",true);
    // this.tooltipText += "";
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    ***********************************************************************
      Left - Re-Start your Mozilla Application
  406. ReFormat Button

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.Cb = custombuttons;
    /*------------------------- Button Code Block Start --------------------------*/
    /**  execute( clip )
     Scope:     global
     Args:      clip -
     Returns:   Nothing
     Called by: 1. onclick & ondrop
     Purpose:   1. Place a re-formatted button Clipboard link into the Clipboard.
    **/
    this.execute = function( uri ) //{{{
    {
      let values = this.Cb.oSplitButtonURI( uri );
      if ( typeof values == CB2const.OBJECT) {
        let sCroppedName = ( values.name.length > 30 )? values.name.substr( 0, 27 ) + "..." : values.name;
        let sLinkChunk = this.Cb.buildLinkChunk( values );
        this.Cb.gClipboard.write( "custombutton://" + sLinkChunk );
      } // End if ( typeof oRet == CB2const.OBJECT
    }; //}}} End Function this.execute( clip )
    /**  getSupportedFlavours(  )
     Scope:    private
     Args:
     Returns:  flavours
     Called by:  1. ???
     Purpose:   1. Establish the proper text flavor
     TODO:    1.
    **/
    this.getSupportedFlavours = function(  ) //{{{
    {
      var flavours = new FlavourSet();
      flavours.appendFlavour('text/unicode');
      return flavours;
    }; //}}} End Function this.getSupportedFlavours(  )
    // Empty function onDragOver(e,f,s)
    this.onDragOver = function(e,f,s){}
    /**  onDrop( event, dDat, session )
     Scope:    private
     Args:    event -
        dDat -
        session -
     Returns:  Nothing
     Called by:  1. Mouse drop event.
     Purpose:   1. Fire this.execute on a button drop.
     TODO:    1.
    **/
    this.onDrop = function( event, dDat, session ) //{{{
    {
      this.execute(dDat.data.split('\n')[0]);
    }; //}}} End Function this.onDrop( event, dDat, session )
    this.setAttribute('oncommand', 'this.execute(gClipboard.read());');
    this.setAttribute('ondragover','nsDragAndDrop.dragOver(event,this);');
    this.setAttribute('ondragdrop','nsDragAndDrop.drop(event,this);');
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author', "deepakjoshi04, SCClockDr" );
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('dependency', "FF2.0*, FL1.0*, TB2.0*, CB2 2.0.6*" );
    this.setAttribute('version', "20090226.01" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/button-re-format-button.html');
    // this.tooltipText = this.label + "";
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    To use:
    1. Copy link to clipboard.
    2. LeftClick on this Button.
     OR
    3. Drag the link & drop it on this button
     OR For button code
    4. Block copy the code.
    5. Drag & drop or LeftClick this button.
  407. ReFormat Button

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.Cb = custombuttons;
    /*------------------------- Button Code Block Start --------------------------*/
    /**  execute( clip )
     Scope:     global
     Args:      clip -
     Returns:   Nothing
     Called by: 1. onclick & ondrop
     Purpose:   1. Place a re-formatted button Clipboard link into the Clipboard.
    **/
    this.execute = function( uri ) //{{{
    {
      let values = this.Cb.oSplitButtonURI( uri );
      if ( typeof values == CB2const.OBJECT) {
        let sCroppedName = ( values.name.length > 30 )? values.name.substr( 0, 27 ) + "..." : values.name;
        let sLinkChunk = this.Cb.buildLinkChunk( values );
        this.Cb.gClipboard.write( "custombutton://" + sLinkChunk );
      } // End if ( typeof oRet == CB2const.OBJECT
    }; //}}} End Function this.execute( clip )
    /**  getSupportedFlavours(  )
     Scope:    private
     Args:
     Returns:  flavours
     Called by:  1. ???
     Purpose:   1. Establish the proper text flavor
     TODO:    1.
    **/
    this.getSupportedFlavours = function(  ) //{{{
    {
      var flavours = new FlavourSet();
      flavours.appendFlavour('text/unicode');
      return flavours;
    }; //}}} End Function this.getSupportedFlavours(  )
    // Empty function onDragOver(e,f,s)
    this.onDragOver = function(e,f,s){}
    /**  onDrop( event, dDat, session )
     Scope:    private
     Args:    event -
        dDat -
        session -
     Returns:  Nothing
     Called by:  1. Mouse drop event.
     Purpose:   1. Fire this.execute on a button drop.
     TODO:    1.
    **/
    this.onDrop = function( event, dDat, session ) //{{{
    {
      this.execute(dDat.data.split('\n')[0]);
    }; //}}} End Function this.onDrop( event, dDat, session )
    this.setAttribute('oncommand', 'this.execute(gClipboard.read());');
    this.setAttribute('ondragover','nsDragAndDrop.dragOver(event,this);');
    this.setAttribute('ondragdrop','nsDragAndDrop.drop(event,this);');
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author', "deepakjoshi04, SCClockDr" );
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('dependency', "FF2.0*, FL1.0*, TB2.0*, CB2 2.0.6*" );
    this.setAttribute('version', "20090226.01" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/button-re-format-button.html');
    // this.tooltipText = this.label + "";
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    To use:
    1. Copy link to clipboard.
    2. LeftClick on this Button.
     OR
    3. Drag the link & drop it on this button
     OR For button code
    4. Block copy the code.
    5. Drag & drop or LeftClick this button.
  408. ReFormat Button

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.Cb = custombuttons;
    /*------------------------- Button Code Block Start --------------------------*/
    /**  execute( clip )
     Scope:     global
     Args:      clip -
     Returns:   Nothing
     Called by: 1. onclick & ondrop
     Purpose:   1. Place a re-formatted button Clipboard link into the Clipboard.
    **/
    this.execute = function( uri ) //{{{
    {
      let values = this.Cb.oSplitButtonURI( uri );
      if ( typeof oRet == CB2const.OBJECT) {
        let sCroppedName = ( values.name.length > 30 )? values.name.substr( 0, 27 ) + "..." : values.name;
        let sLinkChunk = this.Cb.buildLinkChunk( values );
        this.Cb.gClipboard.write( "custombutton://" + sLinkChunk );
      } // End if ( typeof oRet == CB2const.OBJECT
    }; //}}} End Function this.execute( clip )
    /**  getSupportedFlavours(  )
     Scope:    private
     Args:
     Returns:  flavours
     Called by:  1. ???
     Purpose:   1. Establish the proper text flavor
     TODO:    1.
    **/
    this.getSupportedFlavours = function(  ) //{{{
    {
      var flavours = new FlavourSet();
      flavours.appendFlavour('text/unicode');
      return flavours;
    }; //}}} End Function this.getSupportedFlavours(  )
    // Empty function onDragOver(e,f,s)
    this.onDragOver = function(e,f,s){}
    /**  onDrop( event, dDat, session )
     Scope:    private
     Args:    event -
        dDat -
        session -
     Returns:  Nothing
     Called by:  1. Mouse drop event.
     Purpose:   1. Fire this.execute on a button drop.
     TODO:    1.
    **/
    this.onDrop = function( event, dDat, session ) //{{{
    {
      this.execute(dDat.data.split('\n')[0]);
    }; //}}} End Function this.onDrop( event, dDat, session )
    this.setAttribute('oncommand', 'this.execute(gClipboard.read());');
    this.setAttribute('ondragover','nsDragAndDrop.dragOver(event,this);');
    this.setAttribute('ondragdrop','nsDragAndDrop.drop(event,this);');
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author', "deepakjoshi04, SCClockDr" );
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('dependency', "FF2.0*, FL1.0*, TB2.0*, CB2 2.0.6*" );
    this.setAttribute('version', "20090226.01" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/old-button-mover-v7.html');
    // this.tooltipText = this.label + "";
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    To use:
    1. Copy link to clipboard.
    2. LeftClick on this Button.
     OR
    3. Drag the link & drop it on this button
     OR For button code
    4. Block copy the code.
    5. Drag & drop or LeftClick this button.
  409. Refresh

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	BrowserReload();
    }
    this.rightclick  = function(evt){
    	BrowserReloadSkipCache();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
     file.launch();
    }
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20100413.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/refresh.html');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText = '  L: Refresh    R: Hard Refresh  ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/
    
  410. Registry Editor Jump

    Code Tab

    /*Code*/
    function regValueNormalize() {
      regValue = regValue.replace(/\t/g, "");
      regValue = regValue.replace(/\n/g, "");
      regValue = regValue.replace(/\r/g, "");
      regValue = regValue.trim();
      if (regValue.charAt(0) == "[") {
        regValue = regValue.substring(1, regValue.length);
      }
      if (regValue.charAt(regValue.length - 1) == "]") {
        regValue = regValue.substring(0, regValue.length - 1);
      }
      var regValueSplit = regValue.split("\\");
      for (var i = 0; i < regValueSplit.length; i++) {
        regValueSplit[i] = regValueSplit[i].trim();
      }
      regValue = regValueSplit.join("\\");
      var hiveShort = new Array("HKCR", "HKCU", "HKLM", "HKU", "HKCC");
      var hiveLong = new Array("HKEY_CLASSES_ROOT",
        "HKEY_CURRENT_USER",
        "HKEY_LOCAL_MACHINE",
        "HKEY_USERS",
        "HKEY_CURRENT_CONFIG");
      for (var i = 0; i < hiveShort.length; i++) {
        regValue = regValue.replace(hiveShort[i], hiveLong[i]);
      }
    }
    var regName = "Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit";
    var regValue;
    if (content.window.getSelection().toString().
      search(/(HKCR|HKCU|HKLM|HKU|HKCC|HKEY)/) > -1) {
        regValue = content.window.getSelection().toString();
        regValueNormalize();
    } else if (gClipboard.read().
      search(/(HKCR|HKCU|HKLM|HKU|HKCC|HKEY)/) > -1) {
        regValue = gClipboard.read();
        regValueNormalize();
    } else {
      regValue = "My Computer";
    }
    var promptBox = custombuttons.promptBox("Registry Editor Jump",
      "open regedit.exe to the following key",
      regValue);
    if (promptBox[0]) {
      regValue = promptBox[1];
      var wrk = Components.classes["@mozilla.org/windows-registry-key;1"].
        createInstance(Components.interfaces.nsIWindowsRegKey);
      wrk.create(wrk.ROOT_KEY_CURRENT_USER, regName, wrk.ACCESS_WRITE);
      wrk.writeStringValue("LastKey", regValue);
      wrk.close();
      var file = Components.classes["@mozilla.org/file/local;1"].
        createInstance(Components.interfaces.nsILocalFile);
      file.initWithPath("C:\\WINDOWS\\regedit.exe");
      file.launch();
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/registry-editor-jump.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.0.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  411. Reload All Tabs

    Code Tab

    gBrowser.reloadAllTabs();

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080923.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/reload-all-tabs.html');
    this.setAttribute('dependency','FF3.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  412. Reload Skip Cache

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    BrowserReloadSkipCache();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/reload-skip-cache.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    null
  413. Reload, Reload Skip Cache & Reload All All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    BrowserReload();
    }
    this.midclick = function(e) {
    BrowserReloadSkipCache();
    }
    this.rightclick = function(e) {
    gBrowser.reloadAllTabs();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Reload|M: Reload Skip Cache|R: Reload All Tabs";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/reload-reload-skip-cache-reload-all-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    null
  414. Remove Visited

    Code Tab

    //----------------------------------- Helper functions
    function xpath(document,query){
    	var result=document.evaluate(query, document, null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
    	var a=[];
    	a.length=result.snapshotLength;
    	for (var i=0; i<a.length; i++){
    		a[i]=result.snapshotItem(i);
    	}
    	return a;
    }
    //------------------------------------
    function remElement(element){
        if (element){
            element.parentNode.removeChild(element);
        }
    }
    //----------------------------------------------------------------------------------------------------
    //Style visited links:
      var styles=':visited, :visited * { font-family: FooFontXXX!important;text-decoration: line-through!important; }';
      var newSS = content.document.createElement('link');
      newSS.rel = 'stylesheet';
      newSS.href = 'data:text/css,' + escape(styles);
      content.document.documentElement.childNodes[0].appendChild(newSS);
    //alert('click OK to continue...');
    function delVisited(){
    	var a=xpath(content.document,"//a[@href]");
    	for(var i=0;i<a.length;i++) {
    		theCSSprop=content.document.defaultView.getComputedStyle(a[i],null).getPropertyValue("font-family");
    		//if(theCSSprop=='FooFontXXX') alert(a[i].innerHTML);
    		//if (i>24 && i<27) alert(theCSSprop);
    		if(theCSSprop=='FooFontXXX') remElement(a[i]);
    	}
    }
    setTimeout(delVisited,1000);
    

    Initialization Tab

    /*Initialization Code*/

    Help Tab

  415. Remove Visited

    Code Tab

    //----------------------------------- Helper functions
    function xpath(document,query){
    	var result=document.evaluate(query, document, null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
    	var a=[];
    	a.length=result.snapshotLength;
    	for (var i=0; i<a.length; i++){
    		a[i]=result.snapshotItem(i);
    	}
    	return a;
    }
    //------------------------------------
    function remElement(element){
        if (element){
            element.parentNode.removeChild(element);
        }
    }
    //----------------------------------------------------------------------------------------------------
    //Style visited links:
      var styles=':visited, :visited * { font-family: FooFontXXX!important;text-decoration: line-through!important; }';
      var newSS = content.document.createElement('link');
      newSS.rel = 'stylesheet';
      newSS.href = 'data:text/css,' + escape(styles);
      content.document.documentElement.childNodes[0].appendChild(newSS);
    //alert('click OK to continue...');
    function delVisited(){
    	var a=xpath(content.document,"//a[@href]");
    	for(var i=0;i<a.length;i++) {
    		theCSSprop=content.document.defaultView.getComputedStyle(a[i],null).getPropertyValue("font-family");
    		//if(theCSSprop=='FooFontXXX') alert(a[i].innerHTML);
    		//if (i>24 && i<27) alert(theCSSprop);
    		if(theCSSprop=='FooFontXXX') remElement(a[i]);
    	}
    }
    setTimeout(delVisited,1000);
    

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/remove-visited-links.html');

    Help Tab

  416. Replace

    Code Tab

    var aTas = content.document.getElementsByTagName("textarea");
    for (var i = 0; i < aTas.length; i++) {
      var tmp = aTas[i].value
      aTas[i].value=tmp.replace(/REPLACE THIS/gi,"FOR THIS");
    }
    for (var i = 0; i < aTas.length; i++) {
      var tmp = aTas[i].value
      aTas[i].value=tmp.replace(/AND THIS/gi,"FOR THISS!");
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/text-replace-button.html');

    Help Tab

    undefined
  417. Replace Host Bookmark

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    var htService = Components.classes["@mozilla.org/browser/nav-history-service;1"].
      getService(Components.interfaces.nsINavHistoryService);
    var bmService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].
      getService(Components.interfaces.nsINavBookmarksService);
    var ioService = Components.classes["@mozilla.org/network/io-service;1"].
      getService(Components.interfaces.nsIIOService);
    var folder;
    /* remove comments to change the working folder from "Bookmarks Menu" to "Folder C"
       where "Folder A" is the name of a folder within "Bookmarks Toolbar"
             "Folder B" is the name of a folder within "Folder A"
             "Folder C" is the name of a folder within "Folder B"
        i.e. "Bookmarks Toolbar" > "Folder A" > "Folder B" > "Folder C" */
    folder = bmService.bookmarksMenuFolder; //Bookmarks Menu
    //folder = bmService.toolbarFolder; //Bookmarks Toolbar
    //folder = bmService.getChildFolder(folder, "Folder A"); //1st level subfolder
    //folder = bmService.getChildFolder(folder, "Folder B"); //2nd level subfolder
    //folder = bmService.getChildFolder(folder, "Folder C"); //3rd level sudfolder
    this.leftclick = function(event) {
      if (content.document.location.host) {
        var query = htService.getNewQuery();
        var options = htService.getNewQueryOptions();
        query.setFolders([folder], 1);
        var result = htService.executeQuery(query, options);
        var rootNode = result.root;
        rootNode.containerOpen = true;
        for (var i = rootNode.childCount - 1; i >= 0; i--) {
          var node = rootNode.getChild(i);
          if (node.type == 0 &&
              node.uri.search(content.document.location.host) > -1 &&
              node.title.search(/\u2605/) == 0) {
            bmService.removeItem(node.itemId);
          }
        }
        rootNode.containerOpen = false;
        var uri = ioService.newURI(content.document.location.href, null, null);
        var title = "\u2605 " + content.document.title;
        bmService.insertBookmark(folder, uri, -1, title);
        custombuttons.alertSlide(title, content.document.location.href);
      }
    }
    this.midclick = function(event) {
      var uri = ioService.newURI(content.document.location.href, null, null);
      var title = content.document.title;
      bmService.insertBookmark(folder, uri, -1, title);
      custombuttons.alertSlide(title, content.document.location.href);
    }
    this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/replace-host-bookmark.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.0.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  418. Reply / Forward

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler -----------------*/
    this.leftclick   = function(evt){
    	goDoCommand('cmd_reply');
    }
    this.midclick    = function(evt){
    	goDoCommand('cmd_replyall');
    }
    this.rightclick  = function(evt){
    	goDoCommand('cmd_forward');
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20090101');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/reply-forward-thunderbird.html');
    this.setAttribute('dependency','TB3.0.*,  TB2.0*, CB2 2.0.9.51*');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    //this.tooltipText = ' L: Reply   M: ReplyAll   R: Forward ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    /*------------------------- Tooltip Block Start ------------------------------*/
    // ver 20090101.0200
    var sp = " ";  // hard space
    let cr = " ";  // hard space
       cr = (custombuttons.compareVersion( custombuttons.gAppVersion(), "3*" ) >= 0)? "\n " : cr ;   
    // Delete any unused lines.
    var ttip = " L:    Reply "
        +cr+sp+" M:    ReplyAll "
        +cr+sp+" R:    Forward ";
    this.tooltipText += sp+cr+sp+ttip+sp+sp;
    /*--------------------------- Tooltip Block End ------------------------------*/

    Help Tab

    Help%3A%0A%0A%0A%20%20%20%20%20Left-click%3A%20Reply%0A%20%20%20%20%20Middle-click%3A%20Reply%20All%0A%20%20%20%20%20Right-click%3A%20Forward%0A%20%20%20%20%20%0A%20%20%20%20%20Shift-right-click%3A%20Context%20Menu%0A%20%20%20%20%20%0A%20%20%20%20%20
  419. Reply / Forward with delete

    Code Tab

    /*Code*/
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    this.leftclick   = function(evt){
    	goDoCommand('cmd_reply');
    	setTimeout(function(){goDoCommand('cmd_delete')}, 3000);
    }
    this.midclick    = function(evt){
    	goDoCommand('cmd_replyall');
    	setTimeout(function(){goDoCommand('cmd_delete')}, 3000);
    }
    this.rightclick  = function(evt){
    	goDoCommand('cmd_forward');
    	setTimeout(function(){goDoCommand('cmd_delete')}, 3000);
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20071120.04del');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/replyforward-wdelete.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    this.tooltipText = ' L: Reply | M: Reply All | R: Forward';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

         Left-click: Reply
         Middle-click: Reply All
         Right-click: Forward
         Shift-right-click: CustomButtons² context menu
       note: the original e-mail will be deleted from the inbox
         There is a short time delay built in before the original is
         deleted.  If the original is not being properly copied to the 
         compose window try increasing the delay value.
              Find this line in the "Initialization Code":
              setTimeout(function(){goDoCommand('cmd_delete')}, 3000);
              Change value "3000" 
  420. resize image

    Code Tab

    /*Code*/

    Initialization Tab

    var sizes=new Array;
    var images=new Array;
    this.zoom= function(evt) {
      if(evt.shiftKey && evt.button==0) {
    		for(var i=0;i<images.length;i++)
    		{
    			images[i].width=sizes[i] [0];
    			images[i].height=sizes[i] [1];
    		}
    		return;
      }
     else if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
    switch(evt.button) {
    case 0:
    		for(var i=0;i<images.length;i++)
    		{
    			images[i].width=images[i].width+sizes[i] [0]*0.1;
    			images[i].height=images[i].height+sizes[i] [1]*0.1;
    		}
    	break;
    case 1:
    	images=getBrowser().contentDocument.getElementsByTagName('IMG');
    	sizes=new Array;
    		for(var i=0;i<images.length;i++)
    		{
    			sizes.push([images[i].width,images[i].height]);
    		}
    	break;
        case 2:
    		for(var i=0;i<images.length;i++)
    		{
    			images[i].width=images[i].width-sizes[i] [0]*0.1;
    			images[i].height=images[i].height-sizes[i] [1]*0.1;
    		}
    break;
    }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.zoom(event);");
    this.setAttribute("context", "");
    this.tooltipText = "[L=Zoom in| M=Custom button Menu | R=Zoom out]";
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/resize-image.html');

    Help Tab

  421. Resize Text Area

    Code Tab

    /*Code*/
    var post = content.document.evaluate("//textarea[@class='post' and @name='message']",
               content.document, null, 6, null);
    if (post.snapshotLength) {
      for (var i = 0; i < post.snapshotLength; i++) {
        var rows = post.snapshotItem(i).getAttribute("rows");
        post.snapshotItem(i).setAttribute("rows", rows * 2);
      }
    }
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','20070126');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/resize-text-area.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  422. Restart

    Code Tab

    /*CODE*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != "function") {
      alert(custombuttons.bundle.GetStringFromName("ButtonCompatabilityAlert"));
      this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg("...")"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    this.leftclick = function(evt){
      if (Cb.App.sName == "Thunderbird" || gBrowser.warnAboutClosingTabs("All")) { // Idea from _pi Thanks!
        var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]
                                   .getService(Components.interfaces.nsIAppStartup);
        appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);
      }
    };
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");  // Calls the Golbal MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = ".65";
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);");
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author","bimzcy");
    this.setAttribute("version","20080927.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/restart.html');
    this.setAttribute("dependency","FF3.0*, FL1.0*, TB2.0*, CB2 2.0*");
    this.setAttribute("status","Development");
    this.setAttribute("public",true);
    // this.tooltipText += "";
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

  423. Restart (no confirmation)

    Code Tab

    /*
      Left = Restart application
      Rawny ^^
    */
    

    Initialization Tab

    // ***** FUNCTIONS ***** //
    function createBrandingBundle() {
        var myBrandingPath = null;
        var myStringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
                            .getService(Components.interfaces.nsIStringBundleService);
        myBrandingPath = "chrome://branding/locale/brand.properties"
        return myStringBundleService.createBundle(myBrandingPath);
    }
    function getWindowType() {
        // Relies on Branding Code so can not be run on startup
        var myBrandStrings = createBrandingBundle();
        var thisBrandShortName = myBrandStrings.GetStringFromName("brandShortName")
        switch (thisBrandShortName) {
          case "Mozilla Thunderbird":
          case "Shredder":
          case "Thunderbird":
            return "mail:3pane";
          case "Nvu":
            return "composer:html";
          case "Calendar":
          case "Sunbird":
            return "calendarMainWindow";
          case "eMusic Download Manager":
          case "eMusic Remote":
            return "emusic:window";
          case "Songbird":
            return "Songbird:Main";
          default:
            return "navigator:browser";
        }
    }
    function Restart()
    {
        // Notify all windows that an application quit has been requested.
        var os = Components.classes["@mozilla.org/observer-service;1"]
                         .getService(Components.interfaces.nsIObserverService);
        var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]
                                  .createInstance(Components.interfaces.nsISupportsPRBool);
        os.notifyObservers(cancelQuit, "quit-application-requested", "restart");
        // Something aborted the quit process.
        if (cancelQuit.data)
         return false;
        var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                         .getService(Components.interfaces.nsIWindowMediator);
        var windows = wm.getEnumerator("");
        var windowType = getWindowType();
        while (windows.hasMoreElements()) {
          var myConfigWindow = windows.getNext().QueryInterface(Components.interfaces.nsIDOMWindowInternal);
          if (myConfigWindow.document.documentElement.getAttribute("windowtype") != windowType) {
             myConfigWindow.close();
          }
        }
        if ("@zeniko/crashrecoveryservice;1" in Components.classes) {
          nsPreferences.setBoolPref("extensions.crashrecovery.resume_session_once", true);
        }
        var appStartup = Components.interfaces.nsIAppStartup;
        Components.classes["@mozilla.org/toolkit/app-startup;1"]
          .getService(appStartup).quit(appStartup.eRestart | appStartup.eAttemptQuit);
        return true;
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) {
      Restart();
    }
    // ***** INITIALISATION ***** //
    this.tooltipText = "Restart";
    this.style.opacity = '.85';
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, zooot');
    this.setAttribute('version','4');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/restart-session-restore.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true)

    Help Tab

    Left = Restart application
  424. Restart (with confirmation)

    Code Tab

    /*
      Left     = Restart application with confirmation dialogue
      Alt+Left = Restart application
      Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                            .getService(Components.interfaces.nsIPromptService);
    // ***** FUNCTIONS ***** //
    function createBrandingBundle() {
        var myBrandingPath = null;
        var myStringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
                            .getService(Components.interfaces.nsIStringBundleService);
        myBrandingPath = "chrome://branding/locale/brand.properties"
        return myStringBundleService.createBundle(myBrandingPath);
    }
    function getWindowType() {
        // Relies on Branding Code so can not be run on startup
        var myBrandStrings = createBrandingBundle();
        var thisBrandShortName = myBrandStrings.GetStringFromName("brandShortName")
        switch (thisBrandShortName) {
          case "Mozilla Thunderbird":
          case "Shredder":
          case "Thunderbird":
            return "mail:3pane";
          case "Nvu":
            return "composer:html";
          case "Calendar":
          case "Sunbird":
            return "calendarMainWindow";
          case "eMusic Download Manager":
          case "eMusic Remote":
            return "emusic:window";
          case "Songbird":
            return "Songbird:Main";
          default:
            return "navigator:browser";
        }
    }
    function Restart()
    {
        // Notify all windows that an application quit has been requested.
        var os = Components.classes["@mozilla.org/observer-service;1"]
                         .getService(Components.interfaces.nsIObserverService);
        var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]
                                  .createInstance(Components.interfaces.nsISupportsPRBool);
        os.notifyObservers(cancelQuit, "quit-application-requested", "restart");
        // Something aborted the quit process.
        if (cancelQuit.data)
         return false;
        var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                         .getService(Components.interfaces.nsIWindowMediator);
        var windows = wm.getEnumerator("");
        var windowType = getWindowType();
        while (windows.hasMoreElements()) {
          var myConfigWindow = windows.getNext().QueryInterface(Components.interfaces.nsIDOMWindowInternal);
          if (myConfigWindow.document.documentElement.getAttribute("windowtype") != windowType) {
             myConfigWindow.close();
          }
        }
        if ("@zeniko/crashrecoveryservice;1" in Components.classes) {
          nsPreferences.setBoolPref("extensions.crashrecovery.resume_session_once", true);
        }
        var appStartup = Components.interfaces.nsIAppStartup;
        Components.classes["@mozilla.org/toolkit/app-startup;1"]
          .getService(appStartup).quit(appStartup.eRestart | appStartup.eAttemptQuit);
        return true;
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) {
      var RestartProceed = prompts.confirm(null, "Restart Firefox", "Restart now?");
      if (RestartProceed) {
        Restart();
      }
    }
    this.aleftclick = function(evt) {
      Restart();
    }
    // ***** INITIALISATION ***** //
    this.tooltipText = "Restart";
    this.style.opacity = '.85';
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny, zooot');
    this.setAttribute('version','4');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/restart-session-restore.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true)

    Help Tab

    Left        = Restart application with confirmation dialogue
    Alt+Left = Restart application
  425. Restart Tabbed

    Code Tab

    /*Code*/
    // Code from codefisher.org button
    var restart_tabbed_g = function () {
      var Cc = Components.classes;
      var Ci = Components.interfaces;
      var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
      var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
      var startup = Ci.nsIAppStartup;
      var home = "browser.startup.homepage";
      var old_home = "extension_buttons.old_home";
      var others = "extension_buttons.others";
      var lock = "extension_buttons.lock";
      var browser_window = "navigator:browser";
      var do_quit = function (flag) {
        prefs.setBoolPref(lock, false);
        Cc["@mozilla.org/toolkit/app-startup;1"].getService(startup)
           .quit(startup.eAttemptQuit | (flag ? startup.eRestart : 0));
      };
      var do_restart = function () {
        do_quit(true);
      };
      var do_exit = function () {
        do_quit(false);
      };
      var collect_urls = function (win) {
        var url = "";
        var ntabs = win.gBrowser.mPanelContainer.childNodes.length;
        for (var i = 0; i < ntabs; ++i) {
          var b = win.gBrowser.getBrowserAtIndex(i);
          try {
            url += b.currentURI.spec + "|";
          } catch (e) {
          // ignore e
          }
        }
        url = url.replace(/\|$/, "");
        return url;
      };
      var collect_other_windows = function () {
        var enumvar = wm.getEnumerator(browser_window);
        var out = [];
        while (enumvar.hasMoreElements()) {
          var win = enumvar.getNext();
          if (win != window) {
            out.push(win);
          }
        }
        return out;
      };
      var x_escape = function (s) {
        return s.replace(/[>\\]/g, function (x) { return "\\" + (x == ">" ? "~" : x); });
      };
      var x_unescape = function (s) {
        return s.replace(/\\(.)/g, function (_, x) { return x == "~" ? ">" : x; });
      };
      var save_state = function () {
        prefs.setBoolPref('extension.tbutton.restart.do.load',true);
        prefs.setCharPref(others, collect_other_windows().map(
          function (w) {
            return ">" + x_escape(collect_urls(w));
          }
        ).join(""));
        var prev = prefs.getCharPref(home);
        var cur = collect_urls(window);
        prefs.setCharPref(home, cur == "" ? "about:blank" : cur);
        prefs.setCharPref(old_home, prev);
      };
      return {
        exec: function () {
          save_state();
            do_restart();
        },
        exit: function () {
          save_state();
          do_exit();
        },
        restore_state: function () {
          prefs.setBoolPref('extension.tbutton.restart.do.load',false);
          try { 
            prefs.getBoolPref(lock);
          } catch(e) {
            return;
          }
          prefs.setBoolPref(lock, true);
          var orig = prefs.getCharPref(old_home);
          if (orig != '') {
            prefs.setCharPref(home, orig);
          }
          prefs.setCharPref(old_home, "");
          var saved = prefs.getCharPref(others);
          var chunks = saved.match(/>[^>]*/g);
          if (chunks && chunks != '' && chunks.length != 0) {
            var wins = chunks.map(
            function (p) {
               return x_unescape(p.substr(1)).split("|");
            });
            wins.forEach(
            function (w) {
              window.open();
              if (w.lenth != 0) {
                var tb = wm.getMostRecentWindow(browser_window).getBrowser();
                var first = w.shift();
                tb.loadURI(first);
                w.forEach(
                  function (url) {
                      tb.addTab(url);
                  });
              }
            });
          }
          prefs.setCharPref(others, "");
        }
      };
    }();
    var prefs = Components.classes["@mozilla.org/preferences-service;1"]
          .getService(Components.interfaces.nsIPrefBranch);
    if (prefs.getBoolPref('extension.tbutton.restart.do.load') == true) {
        addEventListener("load", restart_tabbed_g.restore_state, false);
    }
    restart_tabbed_g.exec();
    

    Initialization Tab

    /*Initialization code*/
    if(custombuttons.isPref("extension.tbutton.restart.do.load")) ;
    else custombuttons.setPrefs("extension.tbutton.restart.do.load",false);
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','Michael Buckley, nicholas');
    this.setAttribute('version','20081123.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/restart-tabbed.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    

    Help Tab

  426. Rev Quote

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    var End = Cb.isPref("extensions.custombuttons.tagIt.index",0);
    this.info = '\n\n [quote=Clipboard]Highlighted[/quote]';
    this.ss = [
    	{ label: 'BBCode', open: '\n...[/quote]', open1: '\n...[/quote]%h', close: '[quote]...', sItemId: '' },
    	{ label: 'HTML', open: '\n...</div></blockquote></div>', open1: '\n.../*<div class="content"><blockquote><div><cite>%c wrote:</cite>%h*/', close: '<div class="content"><blockquote class="uncited"><div>...', sItemId: '' },
            { label: 'WIKI'  , open: '...\n\n' , open1: '...\n\n%h' , close: '\n\n...'  , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
    	index 		: 0,
    	listo 		: '',
    	liste 		: '',
    	listc		: '',
    	theBox		: {},
    	startPos 	: 0,
    	endPos 		: 0,
    	oPosition 	: 0,
    	oHeight 	: 0,
    	text		: '',
    	nHeight		: 0,
    	Highlight	: '',
    	eBlock		: '',
    	cBoard		: '',
    	n		: '',
    	initMeth	: function( oBtn ){
    				this.index	= Number(Cb.getPrefs("extensions.custombuttons.tagIt.index"));
    				this.listo 	= oBtn.ss[this.index].open;
    				this.liste 	= oBtn.ss[this.index].open1;
    				this.listc	= oBtn.ss[this.index].close;
    				this.theBox	= document.commandDispatcher.focusedElement;
    				if ( this.theBox ) {
    					this.startPos 	= this.theBox.selectionStart;
    					this.endPos 	= this.theBox.selectionEnd;
    					this.oPosition 	= this.theBox.scrollTop;
    					this.oHeight 	= this.theBox.scrollHeight;
    					this.text	= this.theBox.value.substring(0,this.startPos);
    					this.nHeight	= this.theBox.scrollHeight - this.oHeight;
    					this.Highlight	= this.theBox.value.substring(this.startPos, this.endPos);
    					this.eBlock	= this.theBox.value.substring(this.endPos, this.theBox.value.length);
    					this.cBoard	= gClipboard.read();
    					this.n		= '';
    					return true;
    				} // End if ( this.theBox )
    				return false;
    			} // End initMeth
    };
    this.doLeft = function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.Highlight) {	// THEBOX CONTAINS NOTHING HIGHLITED.
    		switch(this.pref){
    		case 1:
    			x.text += x.listc + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=0;
    			this.checked=false;
    			break;
    		case 0:
    			if ( e.ctrlKey ) {
    				if (!x.cBoard) {
    					if ( !this.Select() ) return;
    					x.cBoard = this.input.value;
    				}
    				x.text += x.liste.replace(/%c/,x.cBoard).replace(/%h/,'');
    			} else {
    				x.text += x.listo;
    			}
    			var nLen = x.text.length;
    			x.text += x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = nLen;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			if ( x.listc ) {
                              this.pref=1;
    			  this.checked = true;
                            }
    			break;
    		}
    	} else {	// THEBOX CONTAINS SOMETHING HIGHLITED.
    		x.n += x.liste.replace(/\=\"%c\"/,'').replace(/%h/g,x.Highlight)+ x.listc;
    		var nLen = x.n.length;
    		x.text += x.n + x.eBlock;
    		x.theBox.value = x.text;
    		x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos + nLen;
    		x.theBox.scrollTop = x.oPosition + x.nHeight;
    	}
    }; // End this.doLeft*/
    this.doMid= function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro
    	if (!x.cBoard) {
    		if ( !this.Select() ) return;
    		x.cBoard = this.input.value;
    	}
    	if (e.altKey) {
    		x.n += x.liste.replace(/%c/,x.cBoard).replace(/%h/,x.Highlight)+ x.listc;
    	} else {
    		x.n += x.liste.replace(/%c/,x.Highlight).replace(/%h/,x.cBoard)+ x.listc;
    	}
    	var nLen = x.n.length;
    	x.text += x.n;
    	x.theBox.value = x.text + x.eBlock;
    	x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    	x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
    	var prefstring = "extensions.custombuttons.tagIt.index";
    	try {
    		var ssIdx = Cb.getPrefs(prefstring);
    	} catch(ex) {
    		var ssIdx = 0;
    		Cb.setPrefs(prefstring, ssIdx);
    	}
    	var aNodes = this.mObj.getItemsById('Note');
    	for(var i = 0; i < aNodes.length; i++) {
    		aNodes[i].setAttribute("checked",false);
    	}
    	aNodes[ssIdx].setAttribute("checked", true);
    }; // End this.getIndex(aNode)
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
    	var prefstring = "extensions.custombuttons.tagIt.index";
    	Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
    	x.mObj.listener = function(x){x.getIndex();};
    	x.mObj.setSub();
    	var nItem = {}, mItem = {};
    	document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
    	for(var i in x.ss) {
    		nItem = new x.mObj.getItem();
    		nItem.id = 'Note';
    		nItem.label = x.ss[i].label;
    		nItem.value = String(i);
    		nItem.checked = false;
    		// nItem.oncommand = Cb.gMyPrn('erty'+x.id);
    		mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    		this.ss[i].sItemId = mItem.id;
    		mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
    		mItem.setAttribute( 'type','checkbox')
    		mItem.setAttribute( 'checked',false)
    		mItem.setAttribute( 'autocheck',false )
    	} // End for(var i in this.ss)
    	x.mObj.getItem();
    	nItem = x.mObj.getItem();
    	nItem.id = 'Note';
    	this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
    	if (  !Cb.isPref("extensions.custombuttons.tagIt.index") ) {
    		Cb.setPrefs("extensions.custombuttons.tagIt.index",0);
    	} // End if ( !Cb.isPref("extensions.custombuttons.tagIt.index") )
    	var index = Cb.getPrefs("extensions.custombuttons.tagIt.index");
    	this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("extensions.custombuttons.tagIt.index"); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    this.Select = function (){
    	this.input.value = '';
    	var result = this.prompts.prompt(null, this.sTitle, this.sMsg, this.input, null, this.check);
    	var x = this.input.value
    	return result;
    };
    this.prompts	= Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
    			.getService(Components.interfaces.nsIPromptService);
    this.input	= {value: ''};
    this.check	= {value: false };
    this.sTitle	= 'Author?';
    this.sMsg	= 'Enter the Author\'s user name';
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    **************************************************************
     L = IF text is highlighted:
       BBCode: ...[/quote]Highlighted[quote]...
       HTML: ...</blockquote>Highlighted<tags style>...
       WIKI: ...\n\nHighlighted\n\n...
       OR nothing highlighted
         First click = ...[/quote], ...</blockquote>, or ...\n\n
         Second click = [quote]..., <tags style>..., or \n\n...
     M =
       BBCode: ...[/quote]Clipboard[quote]...
       HTML: ...</blockquote>Clipboard<tags style>...
       WIKI: ...\n\Clipboard\n\n...
     R = Context Menu with tag options and submenu for CB Context
  427. Right²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    var End = Cb.isPref( prefstring, 0 );
    this.info = '\n\nBBCode: [ri'+'ght]Clipboard[/ri'+'ght]\n\nHTML: <'+'p style="text-al'+'ign:right">Clipboard</'+'p>';
    this.ss = [
      { label: 'BBCode'  , open: '[ri'+'ght]'                        , open1: '[ri'+'ght]%h'                        , close: '[/ri'+'ght]' , sItemId: '' },
      { label: 'HTML'    , open: '<'+'p style="text-ali'+'gn:right">', open1: '<'+'p style="text-al'+'ign:right">%h', close: '</'+'p>'     , sItemId: '' },
      { label: 'Wiki N/A', open: ''                                  , open1: ''                                    , close: ''            , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('???????')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
      index     : 0,
      listo     : '',
      liste     : '',
      listc    : '',
      theBox    : {},
      startPos   : 0,
      endPos     : 0,
      oPosition   : 0,
      oHeight   : 0,
      text    : '',
      nHeight    : 0,
      Highlight  : '',
      eBlock    : '',
      cBoard    : '',
      n    : '',
      arr    : [],
      initMeth  : function(oBtn){
            this.index  = Number(Cb.getPrefs( prefstring ));
            this.listo   = oBtn.ss[this.index].open;
            this.liste   = oBtn.ss[this.index].open1;
            this.listc  = oBtn.ss[this.index].close;
            this.theBox  = document.commandDispatcher.focusedElement;
            if ( this.theBox ) {
              this.startPos   = this.theBox.selectionStart;
              this.endPos   = this.theBox.selectionEnd;
              this.oPosition   = this.theBox.scrollTop;
              this.oHeight   = this.theBox.scrollHeight;
              this.text  = this.theBox.value.substring(0,this.startPos);
              this.nHeight  = this.theBox.scrollHeight - this.oHeight;
              this.Highlight  = this.theBox.value.substring(this.startPos, this.endPos);
              this.eBlock  = this.theBox.value.substring(this.endPos, this.theBox.value.length);
              this.cBoard  = gClipboard.read();
              this.n    = '';
              return true;
            } // End if ( this.theBox )
            return false;
          } // End initMeth
    };
    this.doLeft = function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.Highlight) {  // THEBOX CONTAINS NOTHING HIGHLITED.
        switch(this.pref){
        case 1:
          x.text += x.listc + x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=0;
          this.checked=false;
          break;
        case 0:
          x.text += x.listo;
          x.text += x.eBlock;
          x.theBox.value = x.text;
          x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
          x.theBox.scrollTop = x.oPosition + x.nHeight;
          this.pref=1;
          this.checked=true;
          break;
        }
      } else {  // THEBOX CONTAINS SOMETHING HIGHLITED.
        x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
        var nLen = x.n.length;
        x.text += x.n + x.eBlock;
        x.theBox.value = x.text;
        x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
        x.theBox.scrollTop = x.oPosition + x.nHeight;
      }
    }; // End this.doLeft*/
    this.doMid= function(e){
      if ( !this.intro.initMeth( this ) ) {
        return;
      } // End if ( !this.intro.initMeth( this ) )
      var x = this.intro;
      if (!x.cBoard) {
        alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
        return;
      }
      x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
      var nLen = x.n.length;
      x.text += x.n;
      x.theBox.value = x.text + x.eBlock;
      x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
      x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
      let ssIdx = Cb.getPrefs( prefstring ,0);
      let aNodes = this.mObj.getItemsById( 'Note' );
      for( let i = 0; i < aNodes.length; i++ ) {
        aNodes[i].setAttribute( "checked", false );
      }
      aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
      Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
      x.mObj.listener = function(x){x.getIndex();};
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        nItem.value = String(i);
        nItem.checked = false;
        // nItem.oncommand = Cb.gMyPrn('erty'+x.id);
        mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
        this.ss[i].sItemId = mItem.id;
        mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
        mItem.setAttribute( 'type','checkbox')
        mItem.setAttribute( 'checked',false)
        mItem.setAttribute( 'autocheck',false )
      } // End for(var i in this.ss)
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
      this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-justify-group.html');
    this.setAttribute('dependency','FF 2.0.*,  CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [right]Highlighted[/right]
    	 HTML: <p style="text-align:right">Highlighted</p>	
    	 WIKI N/A: 	
    	 OR nothing highlighted
    		 First click = [right] or <p style="text-align:right">	
    		 Second click = [/right] or </p>
     M =  ( Highlighted text will be replaced )
    	 BBCode: [right]Clipboard[/right]
    	 HTML: <p style="text-align:right">Clipboard</p>	
    		 Any Highlighted text will be REPLACED	
    	 WIKI N/A: 	
     R = Context Menu with tag options and submenu for CB Context
  428. Rollyo RollBar

    Code Tab

    /*Code*/
    var test = content.document.getElementById("rollyo-bar");
    if(test) {
      test.style.display = test.style.display == "" ? "none" : "";
      return;
    }
    var rurl = content.location.hostname;
    var div1 = content.document.body.appendChild(content.document.createElement("div"));
    div1.id = "rollyo-bar";
    div1.setAttribute("style", "position: fixed; z-index:9998; top: 5px; left: 5px; width: 385px; size: 10pt; padding: 0px; text-align: right; background-color: #c00; font-family: helvetica; color: #999;");
    div1.addEventListener("click", function(event) {
      this.style.display = this.style.display == "" ? "none" : "";
    }, false);
    var div2 = div1.appendChild(content.document.createElement("div"));
    div2.setAttribute("style", "padding: 5px 10px; background-color: #000; cursor: pointer;");
    div2.appendChild(content.document.createTextNode("close"));
    var div3 = div2.insertBefore(content.document.createElement("div"), div2.firstChild);
    div3.setAttribute("style", "float:left;");
    var a = div3.appendChild(content.document.createElement("a"));
    a.setAttribute("style", "margin-left: 7px; font-size: 10pt; text-decoration: none; border: none; color: #999;");
    a.href = "http://rollyo.com/";
    a.appendChild(content.document.createTextNode("Rollyo"));
    var iframe = div1.appendChild(content.document.createElement("iframe"));
    iframe.setAttribute("style", "width: 385px; height: 110px;");
    iframe.src = "http://rollyo.com/blt.html?url=" + rurl;
    iframe.setAttribute("scrolling", "no");
    iframe.setAttribute("frameborder", 0);
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute("onclick", "if(event.button == 1) gBrowser.loadOneTab('http://rollyo.com/')");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','20060923');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/rollyo-rollbar.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  429. RTM Bookmarklet

    Code Tab

    loadURI("javascript:(function(){h='www.rememberthemilk.com';p='/services/ext/addtask.rtm';if(window.getSelection){d=window.getSelection();}else%20if(document.getSelection){d=document.getSelection();}else%20if(document.selection){d=document.selection.createRange().text;};cp='http://'+h+p+'?d='+encodeURIComponent(d)+'&t='+encodeURIComponent(document.title);w=window.open(cp,'addwindow','status=no,toolbar=no,width=475,height=260,resizable=yes');setTimeout(function(){w.focus();},%20500);})();");

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080404.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/rememberthemilk-bookmarklet-button.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    undefined
  430. Run

    Code Tab

    /*Code*/
    this.gsearch(event);
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    var fileName=filePath()+"/run.bat";
    writeFile(fileName,"%1");
    function searchBox() {
      var searchbar, searchbox, sEngine, sInput, sQuery;
      searchbar = document.getElementById("flock_searchbar") ||
                  document.getElementById("searchbar");
      searchbox = searchbar.mTextbox || searchbar.textbox;
      sEngine = searchbar.tooltipText.replace(/^Search\s/, "");
      sInput = searchbox.value.replace(/\sSearch$/, "");
      sInput = sInput.replace(/\s/,"");
      if(sEngine == sInput || searchbox.value== "") sQuery = "";
      else sQuery = searchbox.value;
      return sQuery;
    }
    this.gsearch= function(evt) {
     var query;
     if(searchBox()) query = searchBox();
      else query = prompt("Query:", "", "Search");
      if(query)
    	{
              this.startProcess(fileName,query);
    	}
    }
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\'));
     args=args.replace(/\//g,'\\');
    // file.launch();
     process.init(file);
     process.run(false,[args],1); 
    }
    function filePath()
    {
    		var dir = Components.classes["@mozilla.org/file/directory_service;1"]
    		           .getService(Components.interfaces.nsIProperties)
    		           .get("ProfD", Components.interfaces.nsIFile);
    		dir.append("custombuttons");
    		if (!dir.exists()) {
    			try{
    				dir.create(0x01, 0755);
    			} catch(e){
    				var msg='Custom Buttons error.]'
    					+'[ Event: Creating custombuttons directory]'
    					+'[ '+e;
    				Components.utils.reportError(msg);
    			}
    		}
    	return dir.path;
    }
    function writeFile( sFilePath, sFileContent )
    {
      try
      {
        sFilePath=sFilePath.replace(/\//g,'\\');
        var file = Components.classes["@mozilla.org/file/local;1"]
                      .createInstance(Components.interfaces.nsILocalFile);
        file.QueryInterface(Components.interfaces.nsIFile);
        file.initWithPath( sFilePath );
        if( file.exists() == true ) return;
        var strm = Components.classes["@mozilla.org/network/file-output-stream;1"]
                      .createInstance(Components.interfaces.nsIFileOutputStream);
        strm.QueryInterface(Components.interfaces.nsIOutputStream);
        strm.QueryInterface(Components.interfaces.nsISeekableStream);
        strm.init( file, 0x04 | 0x08, 420, 0 );
        strm.write( sFileContent, sFileContent.length );
        strm.flush();
        strm.close();
      }
      catch(ex)
      {
        window.alert(ex.message);
      }
    }
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','20061113.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/run-command-simulator.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  431. Run Program with Arguments

    Code Tab

    /*Code*/
    function runProgram(progPath, arg)
    {
      var argArray = arg ? arg.split(/\s+/) : [];
      var nsILocalFile = Components.classes["@mozilla.org/file/local;1"]
          .getService(Components.interfaces.nsILocalFile);
      var nsIProcess = Components.classes["@mozilla.org/process/util;1"]
          .getService(Components.interfaces.nsIProcess);
      nsILocalFile.initWithPath(progPath);
      nsIProcess.init(nsILocalFile);
      nsIProcess.run(false, argArray, argArray.length);
      nsIProcess.close();
      return nsILocalFile;
    }
    runProgram("/usr/bin/thunderbird","-safe-mode");
    

    Initialization Tab

    // button attributes
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);");
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20090413.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/run-program-arguments.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    

    Help Tab

    Left: Launch pre-programmed application with specified arguments
  432. Safari.ran with Wine (instructions)

    Code Tab

    /*CODE*/
    var page = gBrowser.currentURI;
    var browser = "/home/nicholas/.wine/drive_c/Program Files/Safari/Safari.exe";
    var file =  Components.classes["@mozilla.org/file/local;1"]
                          .createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath(browser);
    var process = Components.classes["@mozilla.org/process/util;1"]
                            .createInstance(Components.interfaces.nsIProcess);
    process.init(file);
    process.run(false, [page.spec], 1);
    return true;
    

    Initialization Tab

    /*Initialization Code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/browser-launch-buttons-linux.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    This button launches the current page in Google Chrome
    It works on the linux operating system.
  433. Save As, Save Complete & Save As MHT All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    saveDocument(window.content.document);
    }
    this.rightclick = function(e) {
    document.getElementById('unmht-filemenu-menuitem-save').click();
    }
    this.midclick = function(e) {
    document.getElementById('savecomplete_menuitem').click();
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/save-save-complete-save-mht-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    null
  434. Save favicon

    Code Tab

    /*Code*/

    Initialization Tab

    var orgImg=this.image;
    this.onLeftClick=function()
    {
    	this.image=document.getElementById("page-proxy-favicon").src;
    }
    this.onMiddleClick=function()
    {
    	this.image=document.getElementById("page-proxy-favicon").src;
    	openUILinkIn(this.image,"save");
    }
    this.onRightClick=function()
    {
    	this.image=orgImg;
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	switch(evt.button) 
    	{
    		case 0:
    			this.onLeftClick();
    			break;
    		case 1:
    			this.onMiddleClick();
    			break;
    		case 2:
    			this.onRightClick();
    			break;
    	}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = this.label;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/save-favicon.html-0');

    Help Tab

  435. Save Favicon

    Code Tab

    /*
    	Thu Jan 25 2007 11:48:35 PM GMT-0800 (Pacific Standard Time)
    	cblover		http://minidata.googlepages.com/
    */
    var orgimg = this.image;
    this.image = document.getElementById("page-proxy-favicon").src;
    if (this.image == '') alert('\n             The page has no favicon.'); else openUILinkIn(this.image,"save");
    this.image = orgimg;
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/save-favicon.html');

    Help Tab

  436. Save Favicon

    Code Tab

    /*code*/
    this.image=document.getElementById("page-proxy-favicon").src;
    openUILinkIn(this.image,"save");
    

    Initialization Tab

    /*initialization code*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = ".65";
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);");
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);");
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*---------------- Custom Buttons² Attributes Block Start ----------------*/
    this.setAttribute("author","(unknown), Custom Buttons(²) community");
    this.setAttribute("version","1.0 (20071216)");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/save-favicon.html-1');
    this.setAttribute("dependency","FF2.0*, CB2 2.0*");
    this.setAttribute("status","beta");
    this.setAttribute("public",true);
    this.setAttribute("help","0,No help file for :"+this.label+": button available");
    /*----------------- Custom Buttons² Attributes Block End -----------------*/
    

    Help Tab

    No help file for :Save Favicon: button available
  437. Save images

    Code Tab

    /*Code*/

    Initialization Tab

    var dir="C:\\3_OK\\test";
    var mPop=document.createElement('menupopup');
    var maxWidth=9000;
    var maxHeight=9000;
    //********************* Main menu functions *******************
    function FirstItem()
    {
    	var img="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAIAAACQKrqGAAAABnRSTlMA4ADfAOP5pAGBAAABB0lEQVR4nHWSoXLDMBBEXzwGZtEftLAsgYWChfqE5AvyC4YtMwwMLDQsDAx0WUinmikpXLELK5BsZ9rmgOZ02tnbPd2ifxOAkU8ZmPTrChg1hnPL4cxuxxjLKUsXNpvoEFCVmiX+RLqAJRnDuRdUuZdMt3BC4anFVFGgN3DKirOAzHfFeo2TSaPLScD/uGkImGoMjBBW2+27KG9jIhnh4V6GoJYVSu9XUho5JkqVCtSYsDsZUjqe2tlag2uczDOia0HGZe7+tVt7f9j3NHT7TnE2XbROXdbe+8fgmolVDgQuf6wsYTqcBr6H7rkFYow0xOEIQWVDtIifX+3Lh6R5tHk/KP4AkOAHFrPpU+I4H2wAAAAASUVORK5CYII=";
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label','Save all Images');
      mItem.value = '1';
      mItem.tooltipText = 'Click here to save all images in a folder';
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',img);
      return mItem;
    }
    function nItem(img,size){
      var mItem=document.createElement('menuitem');
      mItem.setAttribute('label',img);
      mItem.value = img;
      mItem.tooltipText = size+' : '+img;
      mItem.setAttribute('class','menuitem-iconic bookmark-item');
      mItem.setAttribute('image',img);
      return mItem;
    }
    function populateImages(doc)
    {
    		removeAllChilds(mPop);
    		var images=doc.getElementsByTagName('IMG');
    		if(images.length>0)
    		{
    			mPop.appendChild(FirstItem());
    			mPop.appendChild(document.createElement('menuseparator'));
    		}
    		for(var i=0;i<images.length;i++)
    		{
    			var image=images[i].src;
    			var width=images[i].width;
    			var height=images[i].height;
    			if(!image.match("chrome") && image.length!=0 && maxWidth>width && maxHeight>height)
    			{
    				var size=width+'x'+height;
    				var newItem=nItem(image,size);
    				mPop.appendChild(newItem);
    			}
    		}
    }
    function getSelectedSource() {
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var x = content.document.createElement("div");
      x.appendChild(winWrapper.getSelection().getRangeAt(0).cloneContents());
      return x;
    }
    function generateImages()
    {
    		var sel = getSelectedSource();
    		if(!sel.innerHTML) {
    			populateImages(getBrowser().contentDocument);
    		}
    		else
    		{
    			populateImages(sel);
    		}
    }
    this.addImages=function(evt)
    {
    	if(evt.target.value==-1)
    	{
    		generateImages();
    	}
    	else if(evt.target.value==1)
    	{
    		saveAllImages();
    	}	
    	else
    	{	
    		openUILink(evt.target.value);
    	}
    }
    function removeAllChilds(mP)
    {	
    	var NL=mP.childNodes;
    	while(NL.length!=0)
    	{
    		mP.removeChild(NL[0]);
    	}
    }
    function saveAllImages()
    {
    	var NL=mPop.childNodes;
    const nsIFilePicker = Components.interfaces.nsIFilePicker;
    var fp = Components.classes["@mozilla.org/filepicker;1"]
    	           .createInstance(nsIFilePicker);
    fp.init(window, "Please select a folder where\nyou would like to save your images:", nsIFilePicker.modeGetFolder);
    var rv = fp.show();
    if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) {
      var path = fp.file.path.replace(/\\/g,"\\\\")+"\\\\";
    	for(var i=2;i<NL.length;i++)
    	{
    		  var aURI=NL[i].value;
    		  var file=aURI.replace(/.*\//g,'');
    		  DownloadFile(aURI,path+file);
    	}
    }
    	custombuttons.alertSlide('Save Images Button','All images saved');
    }
    function DownloadFile(file, vTo)
    {
    	try
    	{
    		var vURI = 			Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI(file, null, null);
    		var aFile = 	Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
    		aFile.initWithPath(vTo);
    		if (!aFile.exists())
    		{
    			aFile.create(0x00,0644);
    		}
    		var bPers = 	Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(Components.interfaces.nsIWebBrowserPersist);
    		bPers.persistFlags = bPers.PERSIST_FLAGS_REPLACE_EXISTING_FILES;
    		bPers.saveURI(vURI,null,null,null,null,aFile);
    	}
    	catch (e)
    	{
    		alert("ERROR: " + e.message);
    	} 
    }
    //********************* Main menu functions *******************
    //***************************  Context Menu ********************************
    this.setDim= function(evt,wd,hi) {
    maxWidth=wd;
    maxHeight=hi;
    var img="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAMCAYAAAC0qUeeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABd0RVh0Q3JlYXRpb24gVGltZQA2LTAyLTIwMDYi7QqGAAAAJXRFWHRTb2Z0d2FyZQBNYWNyb21lZGlhIEZpcmV3b3JrcyBNWCAyMDA0h3aszwAAAbNJREFUeJxtyj1oE3EAQPF3uX8ud95d21xy9VqJhkb8BLOkgwEdROogCmodXAIuQjnoINVFl4JSCeJQQXBwKkKpuHURCgoKiqiUIg7RWyLRFGqvadrrmaQ5F8c8+G0PQAAGkOxhf7FYfBiPxyPXdX9JQE5Xi+522FRABSJA+k8z8vmNkqbJkq6bJXF1fPZV5ujBXGafSXdXpht1AQndNFiYe8KbpadcujKNv1bdEa+rTu7uxCj5Y2k6HdhubKJoBqtVj68rC5y6MM7vvjE+vLwpCQ4P4/9Zo3xrhoSZ5Oy1SeRYwLP7d2huhly+Mc38uxAwEW1N4GPheRUq7xexsieIJ1Q+Lb3g/MQDAm2E9c43SKoIVVPw/IjjpcfUfqww/2iK3XaINVJgT+E6X6oBkaJCKkEsbfXh2Cmyh7Kcm5ojWP3O3/WfnHFnyWQHGbL7sdP9oAiEnUoymBLoGgxfPE3t8yTtYIvRsZO0miCZMnsbFoo6gDDEDkMHwNRAElCauYcsFIQKkg0xAZVaiNSKQlF9W769/HGrXK/X6ZXjOPhHCs9b3uKyBAwAFpDoeUMbaAAb/wBIp4lrewWT7AAAAABJRU5ErkJggg==";
    var NL=this.childNodes;
    for(var i=0;i<NL.length;i++)
    {
    	NL[i].setAttribute('image','');
    }
    evt.target.setAttribute('image',img);
    generateImages();
    }
    function copyMenuItems(aNode, aID, aSeparator) {
      var menupopup = document.getElementById(aID).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        aNode.appendChild(menupopup.firstChild);
      if(aSeparator)
        aNode.appendChild(document.createElement("menuseparator"));
    }
    function addMenuItem(aLabel, aCommand, aSeparator, aNode) {
      var mItem = aNode.appendChild(document.createElement("menuitem"));
      mItem.setAttribute("label", aLabel);
      mItem.setAttribute("oncommand", aCommand);
      if(aSeparator)
        aNode.insertBefore(document.createElement("menuseparator"), mItem);
    }
    var items = [
      { label: "20x20",
        command: "this.parentNode.setDim(event,20,20)",
        separator: false },
      { label: "50x50",
        command: "this.parentNode.setDim(event,50,50)",
        separator: false },
      { label: "100x100",
        command: "this.parentNode.setDim(event,100,100)",
        separator: false },
     { label: "500x500",
        command: "this.parentNode.setDim(event,500,500)",
        separator: false },
      { label: "All",
        command: "this.parentNode.setDim(event,9000,9000)",
        separator: true }
    ];
    const contextId = "cbContext-pgnButton";
    var test = document.getElementById(contextId);
    if(test) test.parentNode.removeChild(test);
    var mPopup = document.getElementById("mainPopupSet").appendChild(document.createElement("popup"));
    mPopup.id = contextId;
    mPopup.setDim= this.setDim.bind(mPopup);
    for(var i = 0; i < items.length; i++) {
      var item = items[i];
      addMenuItem(item.label, item.command, item.separator, mPopup);
    }
    mPopup.appendChild(document.createElement("menuseparator"));
    var subMenu = mPopup.appendChild(document.createElement("menu"));
    subMenu.setAttribute("label", "Custom Button");
    var subPopup = subMenu.appendChild(document.createElement("menupopup"));
    copyMenuItems(subPopup, "custombuttons-contextpopup");
    this.setAttribute("context", contextId);
    //***************************  Context Menu ********************************
    this.appendChild(mPop);
    this.setAttribute("oncommand","this.addImages(event)");
    this.type = "menu-button";
    this.value=-1;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/save-images.html');

    Help Tab

  438. Save Page

    Code Tab

    /*Code*/
    saveDocument(window.content.document);
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20071122.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/save-page.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    /*Help*/%0A%0A%0ALeft%20click%20to%20open%20file%20picker%20to%20save%20page
  439. Save Session & Exit

    Code Tab

    /*Code*/
    var prefBranch = Components.classes["@mozilla.org/preferences-service;1"].
     getService(Components.interfaces.nsIPrefBranch);
    var pref = "browser.sessionstore.resume_session_once";
    prefBranch.setBoolPref(pref, true);
    goQuitApplication();

    Initialization Tab

    /*Initialization code*/
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/save-session-exit.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  440. Scrapbook

    Code Tab

    /*Code*/

    Initialization Tab

    this.changeCase = function(evt) {
      if(evt.shiftKey || evt.button==1) {
        this.showPopup(this);
        return;
      }
    switch(evt.button) {
    case 0:
    sbBrowserOverlay.execCapture(false,false,true , "event.originalTarget.id");
    break;
    case 1:
        this.showPopup(this);
    break;
        case 2:
           toggleSidebar('viewScrapBookSidebar');
    }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.changeCase(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L = Capture | M = Menu | R = Scrapbook";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/scrapbook-newf.html');

    Help Tab

  441. Scrapbook plus Autosave

    Code Tab

    /*
        buttons desciptioni:  
            L = enable/disable autosave
            M = Scrapbook
            R = Capture dialog
        The left click function of this button requires "Scrapbook Autosave" addon found from the Scrapbook developer website
    */
    

    Initialization Tab

    // ***** IMAGES ***** //
    var RightImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwMS8wNy8wNswecVgAAAAldEVYdFNvZnR3YXJlAE1hY3JvbWVkaWEgRmlyZXdvcmtzIE1YIDIwMDSHdqzPAAABEUlEQVR4nKWTMUvEQBSE5+5SpLMVrklj53+w9A/4O+3F6o6D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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALWS9YgAAAAlwSFlzAAALEQAACxEBf2RfkQAAABh0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjM2qefiJQAAAItJREFUKFNdzOESgiAQRlEQEogIqJTSRPb9X7JlIZvp/uPMtzD4iwE456y1xhitdQaEC27WlkoZwSLcqVXNG8L5gOUHN2oZaWEyQH1y/uqwAcQYOXZqC4QQAg9haqDfAN57HEyyQykIVQSBepZypb6QSmGM1U/7Iu07AspjoJMRk1IKIYYGOc1HKX8Au88UFSHwKwoAAAAASUVORK5CYII=";
    // ***** VARS ***** //
    var prefstring = "scrapbook.autosave.enabled";
    // ***** FUNCTIONS ***** //
    function GetPrefs() {
        try {
            return(custombuttons.getPrefs(prefstring));
        }
        catch(e) {}
    }
    // ***** MOUSE HANDLING ***** //
    this.changeCase = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
    switch(evt.button) {
    case 0:
        if (GetPrefs() == true) {
            custombuttons.setPrefs(prefstring,false);
            this.image = RightImg;
        }
        else {
            custombuttons.setPrefs(prefstring,true);
            this.image = LeftImg;
        }
        break;
    case 1:
        toggleSidebar('viewScrapBookSidebar');
        break;
    case 2:
        sbBrowserOverlay.execCapture(false,false,true , "event.originalTarget.id");
        break;
    }
    }
    // ***** INITIALISATION ***** //
    switch(GetPrefs()) {
      case true: this.image = LeftImg; break;
      case false: this.image = RightImg; break;
      default: this.image = DefaultImg;
    }
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.changeCase(event);");
    this.setAttribute("context", "");
    this.setAttribute('author','Rio, SCClock, Rawny')
    this.setAttribute('version','2009-01-23 1');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/scrapbook-plus-autosave.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);
    this.tooltipText = "L = enable/disable autosave | M = Scrapbook | R = Capture dialog";
    

    Help Tab

  442. Script Loader

    Code Tab

    /* -------------------------------------------------------------
         Script Loader
         by LouCypher (aka Zoolcar9)
         Load a script and execute it
       ------------------------------------------------------------- */
    this.loadScript();
    

    Initialization Tab

    var Cc = Components.classes;
    var Ci = Components.interfaces;
    var prefString = "custombuttons.jsRunner.lastScript";
    this.getPref = function() {
      var pref = "";
      try {
        pref = gPrefService.getCharPref(prefString);
      } catch(ex) {
      }
      return pref;
    }
    this.getFile = function() {
      const nsIFilePicker = Ci.nsIFilePicker;
      var fp = Cc['@mozilla.org/filepicker;1'].
               createInstance(nsIFilePicker);
      fp.init(window, gNavigatorBundle.getString("openFile"),
                       nsIFilePicker.modeOpen);
      fp.appendFilter("JavaScript", "*.js");
      fp.appendFilters(nsIFilePicker.filterAll);
      if (fp.show() == nsIFilePicker.returnCancel) return;
      gPrefService.setCharPref(prefString, fp.fileURL.spec);
      return fp.fileURL.spec;
    }
    this.scriptLoader = function(aFile) {
      var JSSubScriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
                              getService(Ci.mozIJSSubScriptLoader)
      try {
        JSSubScriptLoader.loadSubScript(aFile);
      } catch(ex) {
        alert(ex);
      }
    }
    this.rightClick = function(aEvent) {
      if (aEvent.button == 1) {
        var file = this.getPref() || this.getFile();
        if (!file) return;
        this.scriptLoader(file);
      }
    }
    this.setAttribute("onclick", "this.rightClick(event);");
    var tooltipId = "scriptLoaderTooltip";
    var tooltipLabels = [this.label, ""];
    this.updateTooltip = function() {
      var tooltip = document.getElementById(tooltipId + "2");
      var pref = this.getPref();
      tooltip.setAttribute("value", pref);
    }
    var tooltip = this.appendChild(document.createElement("tooltip"));
    tooltip.id = tooltipId;
    tooltip.setAttribute("onpopupshowing", "parentNode.updateTooltip()");
    var box = tooltip.appendChild(document.createElement("vbox"));
    for(var i = 0; i < tooltipLabels.length; i++) {
      var ttLabel = box.appendChild(document.createElement("label"));
      ttLabel.id = tooltipId + (i + 1);
      ttLabel.setAttribute("value", tooltipLabels[i]);
    }
    this.setAttribute("tooltip", tooltipId);
    this.removeAttribute("tooltiptext");
    this.loadScript = function() {
      var file = this.getFile();
      if(!file) return;
      this.scriptLoader(file);
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/script-loader.html');

    Help Tab

  443. Scrybe

    Code Tab

    function bMk()
    {
    var svr='http://iscrybe.com/organizer/27_2/';
    var d=content.document;
    s1=d.createElement('script');
    if(typeof(s1)!='object')s1=d.standardCreateElement('script');
    s1.src=svr+'htmlParser_js';
    s1.type='text/javascript';
    d.getElementsByTagName('head')[0].appendChild(s1);
    s2=d.createElement('script');
    if(typeof(s2)!='object')s2=d.standardCreateElement('script');
    s2.src=svr+'bm_js/fetch';
    s2.type='text/javascript';
    d.getElementsByTagName('head')[0].appendChild(s2);
    //add these lines:
    content.wrappedJSObject.svr = svr;
    content.wrappedJSObject.s1 = s1;
    content.wrappedJSObject.s2 = s2;
    }
    bMk();

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/scrybeit-button.html');

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  444. Scrybe This!

    Code Tab

    /*CODE*/
    function bMk()
    {
    var svr='http://iscrybe.com/organizer/27_2/';
    var d=content.document;
    s1=d.createElement('script');
    if(typeof(s1)!='object')s1=d.standardCreateElement('script');
    s1.src=svr+'htmlParser_js';
    s1.type='text/javascript';
    d.getElementsByTagName('head')[0].appendChild(s1);
    s2=d.createElement('script');
    if(typeof(s2)!='object')s2=d.standardCreateElement('script');
    s2.src=svr+'bm_js/fetch';
    s2.type='text/javascript';
    d.getElementsByTagName('head')[0].appendChild(s2);
    //add these lines:
    content.wrappedJSObject.svr = svr;
    content.wrappedJSObject.s1 = s1;
    content.wrappedJSObject.s2 = s2;
    }
    bMk();
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/scrybe-button-icdeadppl.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  445. Search

    Code Tab

    this.gSiteSearch(event);

    Initialization Tab

    var GImg="data:image/gif;base64,R0lGODlhEAAQAPfKAAATVikwdA8SnxUfgAsWpAAilholjx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XMgQJtRSE4gmgUkwh1EiZTNUiamy6NUUExcuoJgDCdDjQg9KgVL2SNFT1hwEvKglLBWuixZ+jSrlSBdRlL04bBBkTBdpZTpIqWsFaBcTEr0QaEhl6dWlkoJEzZLmaI1VDxYglEAlTJGyizN+ULGDBhFTVoAIpIgSJ1Zulp5ocBAQpVWUUIok4NBwJZMygYpg2VmABZERz60IsQGAgErclTR6aMFQBZESUb04cQJzgsDCyw4qJDhhxtlS1YmjEKkTJkyZcqUKVN2SZmuT1JmzJgxY8aMGTNmzJgxY8YMgDOUBAQAOw==";
    var apps=new Array;
    //------menu items--------
    apps.push(['Google',"http://www.google.com/search?q=",GImg]);
    apps.push(['MetaLink',"https://metalink.oracle.com/metalink/plsql/ml2_gui.handleSearchRequest?p_text=", this.image]);
    apps.push(['ST Docs',"http://www.oracle.com/pls/db92/print_hit_summary?search_string=",this.image]);
    function selectedText() {
      var focusedWindow, winWrapper, aSelection;
      focusedWindow = document.commandDispatcher.focusedWindow;
      winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      aSelection = winWrapper.getSelection().toString();
      if(aSelection.match(/\s/)) 
    {
      aSelection =aSelection.replace(" ","");
      aSelection = "\"" + aSelection + "\"";
    }
      return aSelection;
    }
    function searchBox() {
      var searchbar, searchbox, sEngine, sInput, sQuery;
      searchbar = document.getElementById("flock_searchbar") ||
                  document.getElementById("searchbar");
      if(!searchbar) return;
      searchbox = searchbar.mTextbox || searchbar._textbox;
      sEngine = searchbar.tooltipText.replace(/^Search\s/, "");
      sInput = searchbox.value.replace(/\sSearch$/, "");
      if(sEngine == sInput || searchbox.firstChild.src == "") sQuery = "";
      else sQuery = searchbox.value;
      return sQuery;
    }
    function getInput() {
      var p = prompt("Enter search query:", "", "Search");
      return p;
    }
    this.gSiteSearch = function(evt) {
      var query = selectedText() || searchBox() || getInput();
      if(query)
    	{
    	  this.tooltipText =apps[evt.target.value] [0] ;
          gBrowser.selectedTab = gBrowser.addTab(apps[evt.target.value] [1]+ encodeURIComponent(query));
    	  this.image=apps[evt.target.value] [2];
    	  this.value=evt.target.value;
    	}
    }
    //------/menu items-------
    var nMItem=function(value){
      var m=document.createElement('menuitem');
      m.setAttribute('label',apps[value] [0]);
      m.setAttribute('class','menuitem-iconic bookmark-item');
      m.setAttribute('image',apps[value] [2]);
      m.setAttribute('value',value);
      m.tooltipText=apps[value] [0];
      return m;
    }
    var mP=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mP.appendChild(document.createElement('menuseparator'));
     }else{
      mP.appendChild(nMItem(i));
     }
    }
    this.appendChild(mP);
    this.tooltipText=apps[0] [0];
    this.image=apps[0] [2];
    this.value=0;
    this.type="menu-button";
    this.homepage="http://custombuttons.phpbbnow.com/viewtopic.php?p=44";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/search-engine-button.html');

    Help Tab

  446. Search

    Code Tab

    /*Code*/

    Initialization Tab

    var GImg=this.image;
    GPic=this.image;
    AskImg=this.image;
    MSNImg=this.image;
    VisimoImg=this.image;
    var apps=new Array;
    //------menu items--------
    apps.push(['Google',"http://www.google.com/search?q=",GImg]);
    apps.push(['Google Bilder',"http://images.google.com/images?q=",GPic]);
    apps.push(['Ask Jeeves',"http://www.ask.com/web?q=",AskImg]);
    apps.push(['MSN Live Search',"http://search.live.com/results.aspx?q=",MSNImg]);
    apps.push(['Ask Visimo',"http://de.vivisimo.com/search?tb=homepage&dlang=de&language=all&query=",VisimoImg]);
    function selectedText() {
      var focusedWindow, winWrapper, aSelection;
      focusedWindow = document.commandDispatcher.focusedWindow;
      winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      aSelection = winWrapper.getSelection().toString();
      if(aSelection.match(/\s/))
    {
      aSelection =aSelection.replace(" ","");
      aSelection = "\"" + aSelection + "\"";
    }
      return aSelection;
    }
    function searchBox() {
      var searchbar, searchbox, sEngine, sInput, sQuery;
      searchbar = document.getElementById("flock_searchbar") ||
                  document.getElementById("searchbar");
      if(!searchbar) return;
      searchbox = searchbar.mTextbox || searchbar._textbox;
      sEngine = searchbar.tooltipText.replace(/^Search\s/, "");
      sInput = searchbox.value.replace(/\sSearch$/, "");
      if(sEngine == sInput || searchbox.value == "") sQuery = "";
      else sQuery = searchbox.value;
      return sQuery;
    }
    function getInput() {
      var p = prompt("Enter search query:", "", "Search");
      return p;
    }
    this.gSiteSearch = function(evt) {
      var query = selectedText() || searchBox() || getInput();
      if(query)
       {
         this.tooltipText =apps[evt.target.value] [0] ;
          gBrowser.selectedTab = gBrowser.addTab(apps[evt.target.value] [1]+ encodeURIComponent(query));
         this.image=apps[evt.target.value] [2];
         this.value=evt.target.value;
       }
    }
    //------/menu items-------
    var nMItem=function(value){
      var m=document.createElement('menuitem');
      m.setAttribute('label',apps[value] [0]);
      m.setAttribute('class','menuitem-iconic bookmark-item');
      m.setAttribute('image',apps[value] [2]);
      m.setAttribute('value',value);
      m.tooltipText=apps[value] [0];
      return m;
    }
    var mP=document.createElement('menupopup');
    for (var i=0;i<apps.length;i++){
     if (apps[i] =='separator'){
      mP.appendChild(document.createElement('menuseparator'));
     }else{
      mP.appendChild(nMItem(i));
     }
    }
    this.appendChild(mP);
    this.tooltipText=apps[0] [0];
    this.image=apps[0] [2];
    this.value=0;
    this.type="menu-button";
    this.homepage="http://custombuttons.phpbbnow.com/viewtopic.php?p=44";
    this.setAttribute("oncommand", "this.gSiteSearch(event);");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/search-engine-button.html-0');

    Help Tab

  447. Search Site

    Code Tab

    /*Code*/
    var url = "http://www.google.com/search?q="+ encodeURIComponent(document.getElementById('searchbar').value) + "&sitesearch=";
    var focusedWindow = document.commandDispatcher.focusedWindow;
    if (focusedWindow && focusedWindow.content && focusedWindow.content.document)
      var doc = focusedWindow.content.document;
    else
      return;
    if (doc.location.href.indexOf("http") == 0) {
      var hostname = doc.location.hostname.match(/[^.]+\.(com|net|org)(\.[^.]+)?$/gi);
      if (hostname == null)
        hostname = doc.location.hostname;
      url = url + hostname;
    }
    if (typeof SplitBrowser != "object") {
      gBrowser.addTab(url);
    } else {
      var subBrowser = SplitBrowser.getSubBrowserByName("search");
      if (!subBrowser)
        subBrowser = SplitBrowser.addSubBrowser("", SplitBrowser.mainBrowserBox, SplitBrowser.POSITION_RIGHT, "search");
      subBrowser.load(url);
      subBrowser.expand();
      var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
      prefs.setBoolPref("browser.tabs.loadInBackground",false);
    }
    /******************************************************************************************/
    var ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
    var engine = ss.getEngineByName(this.label);
    if (!engine)
      return;
    else
      ss.currentEngine = engine;

    Initialization Tab

    /*Initialization code*/
    this.setAttribute("author",'ithinc');								// Stores Author.
    this.setAttribute("version",'20080225');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/search-current-site-google.html');      // Stores HomePage.
    this.setAttribute("dependency",'FF 2.0.0.*,CB2 2.0.*');                    			// Stores Dependency.
    this.setAttribute("status",'Development');							// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.
    

    Help Tab

    %0ASearch%20the%20current%20site%20with%20Google
  448. Select All

    Code Tab

    /*Code*/

    Initialization Tab

    this.setAttribute("oncommand","goDoCommand('cmd_selectAll')");
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080306.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/select-all.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    Click%20the%20button%20to%20select%20the%20contents%20of%20the%20current%20page
  449. Select Box Demo

    Code Tab

    /*Code*/
    var cbTitle = "My Title"; // Title of the prompt
    var cbDesc = "My Description/Instructions"; // Instructions/Info just before the input box
    var aList = ["one","two", "three"]; // Default value to place in the input box
    var cbPrompt = custombuttons.selectBox(cbTitle, cbDesc, aList);
    if (cbPrompt[0] == false) alert('cancel'); // first item in array was false
    else alert(aList[cbPrompt[1].value]); // first item in array was NOT false

    Initialization Tab

    /*Initialization code*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas, SCClockDr');
    this.setAttribute('version','20090220.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF3.0*, FL2.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  450. select text

    Code Tab

    /*CODE*/

    Initialization Tab

    //for custombuttons2; goes in the code box, left-click to toggle quotes on selected text
    //ADD TO INIT CODE
    this.changeText = function(button,shift,self){
        if (shift == true){//context menu
            document.getElementById("custombuttons-contextpopup").openPopup(self,"after_pointer");
            return;
        }
        var doc = gBrowser.contentDocument.activeElement;//active tab doc
        var text = doc.value;//active input element
        var selStart = doc.selectionStart;//start of selected text (index #)
        var selEnd = doc.selectionEnd;//end of it
        //split the text up into chunks
        var textBefore = text.substring(0,selStart);
        var textMid = text.substring(selStart,selEnd);
        var textAfter = text.substring(selEnd,text.length);
        if (button == 0){//toggle ""
            //see if it has quotes
            var quoteB = text.substring(selStart,selStart+1);
            var quoteA = text.substring(selEnd,selEnd-1);
            if (quoteB == "\"" && quoteA == "\""){//remove them
                textMid = text.substring(selStart+1,selEnd-1);
                doc.value = textBefore + textMid + textAfter;
                this.selectText(doc,selEnd,2);
            } else {//add them
                doc.value = textBefore + "\"" + textMid + "\"" + textAfter;
                this.selectText(doc,selEnd,2,1);
            }
        } else if (button > 0){//middle or right click
            var whichChar;
            if (button == 1){
                whichChar = "+";
            } else if (button == 2){
                whichChar = "-";
            }
            if (text.substring(selStart,selStart+1) == whichChar){//remove char
                textMid = text.substring(selStart+1,selEnd);
                doc.value = textBefore + textMid + textAfter;
                this.selectText(doc,selEnd,1);
            } else {//add char
                doc.value = textBefore + whichChar + textMid + textAfter;
                this.selectText(doc,selEnd,1,1);
            }
        }
        //ew-so selection start
        doc.selectionStart = selStart;
    }
    //selection end
    this.selectText = function(doc,selEnd,howMany,which){
        if (which == 1){//chars added
            doc.selectionEnd = selEnd+howMany;
        } else {//chars removed
            doc.selectionEnd = selEnd-howMany;
        }
    }
    this.setAttribute("onclick","this.changeText(event.button,event.shiftKey,this)");
    this.setAttribute("context","");
    this.setAttribute("author","ChoGGi");
    this.setAttribute("contact","ChoGGi@gmail.com");
    this.setAttribute("version","0.1");
    this.setAttribute("tooltiptext","Quote Selected Text: L:\"\" M:- R:+\nShift+R: Options");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/quote-selected-text.html');

    Help Tab

  451. Selection to Tab

    Code Tab

    var focusedWindow, winWrapper, str;
    focusedWindow = document.commandDispatcher.focusedWindow;
    winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
    this.addTab(winWrapper.getSelection().toString(),event);
    

    Initialization Tab

    //this stuff is for drag and drop handaling 
    this.getSupportedFlavours = function () {
      var flavours = new FlavourSet();
      flavours.appendFlavour("text/unicode");
      return flavours;
    }
    this.onDragOver = function(e,f,s){}
    this.onDrop = function(event,dDat,session){
      this.addTab(dDat.data,event);
    }
    //this is where both drag and click events end up
    this.addTab =function(str,event){
      while(str.search(/ /)!=-1){
        str=str.replace(/ /,"");
      }
      if(str!=''){
          if(str.substr(0,15)=="custombutton://"){
            gBrowser.loadURI(str);
          }else{
            if(!event.shiftKey){
              gBrowser.selectedTab=gBrowser.addTab(str);	
    	}else{
              gBrowser.loadURI(str);
            }
          }
      }
    }
    //set our drag event handlers
    //nsDragAndDrop is some sort of wrapper provided by FF so that drag and drop stuff is easier
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event,this);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event,this);");
    //and we can't forget the all important home page attribute whatever that does
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/selection-new-tab-jessef.html');
    //press Alt+s on windows to activate the button (I think you use ctrl instead of alt on a mac)
    this.setAttribute("accesskey", "S");

    Help Tab

  452. Set Current, Clipbord & Blank to Homepage All in One

    Code Tab

    /*代码*/

    Initialization Tab

    this.updateTooltip = function(aNode) {
      var homePage = gHomeButton.getHomePage();
      homePage = homePage.replace(/\|/g,', ');
      aNode.tooltipText = homePage;
    }
    this.setHomePage = function(aURL) {
      gPrefService.setCharPref(gHomeButton.prefDomain, aURL);
    }
    this.leftclick = function(e) {
     this.setHomePage(content.location)
    }
    this.rightclick = function(e) {
      url = readFromClipboard();
      this.setHomePage(url);
    }
    this.midclick = function(e) {
     this.setHomePage('about:blank')
    }
    this.setAttribute("onmouseover", "this.updateTooltip(this)");
    this.setAttribute('onclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','0.1 (2009-12-30)');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/set-current-clipbord-blank-homepage-all-one.html');

    Help Tab

    Left Click, Set Current Tab as Homepage
    Middle Click, Set Homepage Blank
    Right Click, Set Clipboard's Url as Homepage
  453. Set TMP on-tab-close focus behaviour (menu button)

    Code Tab

    /*
        This button requires Tab Mix Plus: https://addons.mozilla.org/en-US/firefox/addon/1122
        Left click the button to show the dropdown menu for setting TMP's on-tab-close focus behaviour.
        Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    var button = this;
    var buttonID = this.getAttribute("id");
    var prefstring = "extensions.tabmix.focusTab";
    this.ss = [
    	{ label: "First tab", value: 0 },
    	{ label: "Left tab", value: 1 },
    	{ label: "Opener/Right tab", value: 2 },
    	{ label: "Last tab", value: 3 },
    	{ label: "Last selected tab", value: 4 },
    	{ label: "Right tab", value: 5 },
    	{ label: "Last opened tab", value: 6 },
    ]
    // ***** DETERMINES WHICH ITEM IS CHECKED IN THE CONTEXT MENU ***** //
    this.getIndex = function(aNode) {                    
    	try {
    	// Tries to pull out the preferences value
    		var pref = custombuttons.getPrefs(prefstring);
    	} 
    	catch(ex) {
    // If the above retrieval fails, the preference value is set to 2 as this is the default TMP setting                                         
    		custombuttons.setPrefs(prefstring,2);
    	}
    	var pref = custombuttons.getPrefs(prefstring);                
    // Uncheck all the menu items
    	for(var i = 0; i < aNode.childNodes.length; i++) {              
    		aNode.childNodes[i].removeAttribute("checked");         
    	}
    // Check the menu item where it's index value corresponds to the preference value
    	aNode.childNodes[pref].setAttribute("checked", true);
    }
    // ***** CHECKS AN ITEM IN THE CONTEXT MENU ***** //
    this.setIndex = function(aNode) {
        var pref = custombuttons.getPrefs(prefstring);
    // Sets the preference value to the index value of the aNode passed into this function.
    // In other words, when a particular option is clicked and passed into this function, set the preference value accordingly.
        var i = aNode.getAttribute("index");
        custombuttons.setPrefs(prefstring,parseInt(i));
    // Also check the menu item
        aNode.checked = true;
    }
    // ***** SHOW POPUP FUNCTION ***** // 
    this.popupShowing = function(aNode) {
         	while (aNode.hasChildNodes())
    		aNode.removeChild(aNode.firstChild);
    	var l = button.ss.length;
    	for(var i = 0; i < l; i++) {
    		var mi = document.createElement("menuitem");
                    var commandstring = "document.popupNode.setIndex(this);";
                    mi.setAttribute("oncommand", commandstring);
    	        mi.setAttribute("index", i);
                    mi.setAttribute("label", this.ss[i].label);
    	        mi.setAttribute("value", this.ss[i].value);
    	        mi.setAttribute("type", "checkbox");
    	        mi.setAttribute("autoCheck", false);
                    mi.tooltipText = this.ss[i].label;
                    mPopup.appendChild(mi);
    	}
            button.getIndex(aNode);
    }
    // ***** INITIALISATION ***** //
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    this.appendChild(mPopup);
    this.type = "menu";
    this.setAttribute("class", "menu-iconic");
    this.tooltipText = "L: Show focus behaviour menu";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/close-andor-set-tmp-tab-close-focus-behaviour-buttons.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to show the menu.
    Read the menu as: "When closing current tab, focus:" menu item, e.g. "left tab".
  454. Shortcuts

    Code Tab

    /*Code*/

    Initialization Tab

    var sCuts=dirList("C:/");
    var obj=this;
    var nMItem=function(label,img,path){
    try{
        path = path.replace(/\\/g,'\/');
      var m=document.createElement('menuitem');
      m.setAttribute('label',label);
      m.f=obj.startProcess.bind(obj);
      m.setAttribute('oncommand','this.f("'+path+'")');
      m.setAttribute('class','menuitem-iconic');
      m.setAttribute('image',img);
      m.tooltipText = "Shortcut to "+path;
      return m;
      }
        catch(ex)
        {
            window.alert("Error 1 : " + ex.message);
        }
    }
    this.startProcess=function(path){
    try{
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     path = path.replace(/\//g,'\\');
     file.initWithPath(path);
     file.launch();
      }
        catch(ex)
        {
            window.alert("Error 2 : " + ex.message);
        }
    }
    var mP=createMenu(sCuts);
    function createMenu(sCuts)
    {
    try
    {
    	var mP=document.createElement('menupopup');
    	for (var i=0;i<sCuts.length;i++){
    	 if (sCuts[i] =='separator'){
    	  mP.appendChild(document.createElement('menuseparator'));
    	 }else{
    		//alert(sCuts.length);
    	  mP.appendChild(nMItem(sCuts[i] [0],sCuts[i] [1],sCuts[i] [2]));
    	 }
    	}
    	return mP;
      }
        catch(ex)
        {
            window.alert("Error : " + ex.message);
        }
    }
    function dirList(sFilePath)
    {
        sFilePath = sFilePath.replace(/\//g,'\\');
    	//alert(sFilePath);
        try
        {
            var dir = Components.classes["@mozilla.org/file/local;1"]
                        .createInstance(Components.interfaces.nsILocalFile);
    	if (!dir) return false;
            dir.initWithPath(sFilePath);
    	//mP.appendChild(file.);
    		var contents=dir.directoryEntries;
    		var apps=new Array;
    	while(contents.hasMoreElements())
    	{
    	  var i= contents.getNext();
    	  var file=i.QueryInterface(Components.interfaces.nsILocalFile);
    		if(file.isSymlink())
    		{
    			apps.push([file.leafName,this.image,file.path]);		
    		}
    	}
    	return apps;
        }
        catch(ex)
        {
            window.alert("Error : " + ex.message);
        }
    }
    try{
    	this.orient="horizontal";
    	this.appendChild(mP);
    	this.type='menu';
    }
    catch(ex)
    {
      window.alert("Error : " + ex.message);
    }
    	/*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/windows-shortcuts.html');

    Help Tab

  455. Shorten URL

    Code Tab

    /* -------------------------------------------------------------
         Shorten URL
         by LouCypher (aka Zoolcar9)
         Make the URL shorter using web services
         Syntax: this.shortURL(index, select);
         where index are:
           0: metamark.net
           1: shorl.com
           2: shrinkthislink.com
           3: shurl.org
           4: tinyurl.com
         select: select the new tab if true
       ------------------------------------------------------------- */
    var index = gPrefService.getIntPref("custombuttons.shortenURL.index");
    this.shortURL(index);
    

    Initialization Tab

    this.ss = [
      { label: "Metamark", url: "http://metamark.net/add/popup?long_url=" },
      { label: "Shorlify", url: "http://shorl.com/create.php?url=" },
      { label: "ShrinkThisLink", url: "http://shrinkthislink.com/add.php?url=" },
      { label: "Shurl.org", url: "http://shurl.org/?url=" },
      { label: "TinyURL", url: "http://tinyurl.com/create.php?url=" }
    ]
    this.shortURL = function(aIndex, aSelect) {
      var scheme = content.location.protocol;
      if(!scheme.match(/https?|ftp/)) {
        alert("Unsupported scheme: " + scheme.toUpperCase());
        return;
      }
      var url = encodeURIComponent(content.location.href);
      gBrowser.loadOneTab(this.ss[aIndex].url + url, null, null, null, !aSelect);
    }
    this.getIndex = function(aNode) {
      var prefstring = "custombuttons.shortenURL.index";
      try {
        var ssIdx = gPrefService.getIntPref(prefstring);
      } catch(ex) {
        var ssIdx = 0;
        gPrefService.setIntPref(prefstring, ssIdx);
      }
      for(var i = 0; i < aNode.childNodes.length; i++) {
        aNode.childNodes[i].removeAttribute("checked");
      }
      aNode.childNodes[ssIdx].setAttribute("checked", true);
    }
    this.setIndex = function(aNode) {
      var prefstring = "custombuttons.shortenURL.index";
      gPrefService.setIntPref(prefstring, aNode.getAttribute("index"));
      aNode.checked = true;
      //this will execute shortenURL after selecting a service
      //aNode.shortURL(aNode.getAttribute('index'));
    }
    function addMenuItem(aNode, aObject, aIndex, aLabel, aURL) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("oncommand", "document.popupNode.setIndex(this)");
      mi.setAttribute("index", aIndex);
      mi.setAttribute("label", aLabel);
      mi.setAttribute("url", aURL);
      mi.setAttribute("type", "checkbox");
      mi.setAttribute("group", "shortenURL");
      mi.setAttribute("autoCheck", false);
    }
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
      var m = aNode.appendChild(document.createElement("menu"));
      m.setAttribute("label", "Custom Button");
      var mp = m.appendChild(document.createElement("menupopup"));
      copyMenuItems(mp, "custombuttons-contextpopup");
      aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    const popupID = "cbContext-shortenURL";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.getIndex(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    for(var i = 0; i < this.ss.length; i++) {
      addMenuItem(pop, this, i, this.ss[i].label, this.ss[i].url);
    }
    cloneCBContext(pop);
    this.setAttribute("context", popupID);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/shorten-url-button.html');

    Help Tab

  456. Shorten URL (Context Menu)

    Code Tab

    /* -------------------------------------------------------------
         Shorten URL
         by LouCypher (aka Zoolcar9)
         Make the URL shorter using web services
         Syntax: this.shortURL(index, select);
         where index are:
           0: metamark.net
           1: shorl.com
           2: shrinkthislink.com
           3: shurl.org
           4: tinyurl.com
         select: select the new tab if true
       ------------------------------------------------------------- */
    var index = gPrefService.getIntPref("custombuttons.shortenURL.index");
    this.shortURL(index);
    

    Initialization Tab

    this.ss = [
      { label: "Metamark", url: "http://metamark.net/add/popup?long_url=" },
      { label: "Shorlify", url: "http://shorl.com/create.php?url=" },
      { label: "ShrinkThisLink", url: "http://shrinkthislink.com/add.php?url=" },
      { label: "Shurl.org", url: "http://shurl.org/?url=" },
      { label: "TinyURL", url: "http://tinyurl.com/create.php?url=" }
    ]
    this.shortURL = function(aIndex, aSelect) {
      var scheme = content.location.protocol;
      if(!scheme.match(/https?|ftp/)) {
        alert("Unsupported scheme: " + scheme.toUpperCase());
        return;
      }
      if (this.ss[aIndex].label == "TinyURL") var url = content.location.href;
      else var url = encodeURIComponent(content.location.href);
      gBrowser.loadOneTab(this.ss[aIndex].url + url, null, null, null, !aSelect);
    }
    this.getIndex = function(aNode) {
      var prefstring = "custombuttons.shortenURL.index";
      try {
        var ssIdx = gPrefService.getIntPref(prefstring);
      } catch(ex) {
        var ssIdx = 0;
        gPrefService.setIntPref(prefstring, ssIdx);
      }
      for(var i = 0; i < aNode.childNodes.length; i++) {
        aNode.childNodes[i].removeAttribute("checked");
      }
      aNode.childNodes[ssIdx].setAttribute("checked", true);
    }
    this.setIndex = function(aNode) {
      var prefstring = "custombuttons.shortenURL.index";
      gPrefService.setIntPref(prefstring, aNode.getAttribute("index"));
      aNode.checked = true;
      //this will execute shortenURL after selecting a service
      aNode.shortURL(aNode.getAttribute('index'));
    }
    function addMenuItem(aNode, aObject, aIndex, aLabel, aURL) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("oncommand", "document.popupNode.setIndex(this)");
      mi.setAttribute("index", aIndex);
      mi.setAttribute("label", aLabel);
      mi.setAttribute("url", aURL);
      mi.setAttribute("type", "checkbox");
      mi.setAttribute("group", "shortenURL");
      mi.setAttribute("autoCheck", false);
    }
    function copyMenuItems(node, id, separate) {
      var menupopup = document.getElementById(id).cloneNode(true);
      var menuitems = menupopup.childNodes.length;
      for(var i = 0; i < menuitems; i++)
        node.appendChild(menupopup.firstChild);
      if(separate)
        node.appendChild(document.createElement("menuseparator"));
    }
    function cloneCBContext(aNode) {
      var m = aNode.appendChild(document.createElement("menu"));
      m.setAttribute("label", "Custom Button");
      var mp = m.appendChild(document.createElement("menupopup"));
      copyMenuItems(mp, "custombuttons-contextpopup");
      aNode.insertBefore(document.createElement("menuseparator"), m);
    }
    const popupID = "cbContext-shortenURL";
    var test = document.getElementById(popupID);
    if(test) test.parentNode.removeChild(test);
    var main = document.getElementById("mainPopupSet")
    var pop = main.appendChild(document.createElement("popup"));
    pop.id = popupID;
    pop.setAttribute("onpopupshowing", "document.popupNode.getIndex(this)");
    pop.setAttribute("oncommand", "event.stopPropagation()");
    for(var i = 0; i < this.ss.length; i++) {
      addMenuItem(pop, this, i, this.ss[i].label, this.ss[i].url);
    }
    cloneCBContext(pop);
    this.setAttribute("context", popupID);
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.style.opacity = '.99';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/shorten-url-button-loucypher.html');
    

    Help Tab

  457. Shorten URL (Menu-Button)

    Code Tab

    /* -------------------------------------------------------------
         Shorten URL
         by LouCypher (aka Zoolcar9)
         Make the URL shorter using web services
         Syntax: this.shortURL(index, select);
         where index are:
           0: metamark.net
           1: shorl.com
           2: shrinkthislink.com
           3: shurl.org
           4: tinyurl.com
         select: select the new tab if true
       ------------------------------------------------------------- */
    var index = gPrefService.getIntPref("custombuttons.shortenURL.index");
    this.shortURL(index);
    

    Initialization Tab

    this.ss = [
      { label: "Metamark", url: "http://metamark.net/add/popup?long_url=" },
      { label: "Shorlify", url: "http://shorl.com/create.php?url=" },
      { label: "ShrinkThisLink", url: "http://shrinkthislink.com/add.php?url=" },
      { label: "Shurl.org", url: "http://shurl.org/?url=" },
      { label: "TinyURL", url: "http://tinyurl.com/create.php?url=" }
    ]
    this.shortURL = function(aIndex, aSelect) {
      var scheme = content.location.protocol;
      if(!scheme.match(/https?|ftp/)) {
        alert("Unsupported scheme: " + scheme.toUpperCase());
        return;
      }
      var url = encodeURIComponent(content.location.href);
      gBrowser.loadOneTab(this.ss[aIndex].url + url, null, null, null, !aSelect);
    }
    this.getIndex = function(aNode) {
      var prefstring = "custombuttons.shortenURL.index";
      try {
        var ssIdx = gPrefService.getIntPref(prefstring);
      } catch(ex) {
        var ssIdx = 0;
        gPrefService.setIntPref(prefstring, ssIdx);
      }
      for(var i = 0; i < aNode.childNodes.length; i++) {
        aNode.childNodes[i].removeAttribute("checked");
      }
      aNode.childNodes[ssIdx].setAttribute("checked", true);
    }
    this.setIndex = function(aNode) {
      var prefstring = "custombuttons.shortenURL.index";
      gPrefService.setIntPref(prefstring, aNode.getAttribute("index"));
      aNode.checked = true;
      //this will execute shortenURL after selecting a service
      //aNode.shortURL(aNode.getAttribute('index'));
    }
    function addMenuItem(aNode, aObject, aIndex, aLabel, aURL) {
      var mi = aNode.appendChild(document.createElement("menuitem"));
      mi.setAttribute("oncommand", "this.parentNode.parentNode.setIndex(this)");
      mi.setAttribute("index", aIndex);
      mi.setAttribute("label", aLabel);
      mi.setAttribute("url", aURL);
      mi.setAttribute("type", "checkbox");
      mi.setAttribute("group", "shortenURL");
      mi.setAttribute("autoCheck", false);
    }
    var mp = this.appendChild(document.createElement("menupopup"));
    mp.setAttribute("onpopupshowing", "this.parentNode.getIndex(this)");
    mp.setAttribute("oncommand", "event.stopPropagation()");
    for(var i = 0; i < this.ss.length; i++) {
      addMenuItem(mp, this, i, this.ss[i].label, this.ss[i].url);
    }
    this.type = "menu-button";
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.style.opacity = '.99';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/shorten-url-button-loucypher.html');

    Help Tab

  458. Show Desktop

    Code Tab

    /*Code*/
    /**	Help Info:
    **************************************************
      This Button will clear the desktop of all
    Application windows.
      This button only valid with M$ Windows
    **/
    var path = 'C:/WINDOWS/system32/config/systemprofile/Application Data/Microsoft/Internet Explorer/Quick Launch/Show Desktop.scf';
    var file = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1'].getService(Components.interfaces.nsIProcess);
    file.initWithPath(path.replace(/\//g,'\\\\'));
    file.launch();
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    this.Cb = custombuttons;
    this.properties = {
    	en_US:{
    		Help: '**************************************************\n'
    		+ '  This Button will clear the desktop of all\n'
    		+ 'Application windows.\n'
    		+ '  This button only valid with M$ Windows\n',
    		zLast:'Last no Comma'
    	}
    };
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.style.opacity = '.99';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20080124.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/show-desktop.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('help','0,'+this.Cb.getLocalString( this, 'Help'));
    this.tooltipText += 'in M$ Windows';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    **************************************************
      This Button will clear the desktop of all
    Application windows.
      This button only valid with M$ Windows
    
  459. Show Desktop (for M$ Windows 7)

    Code Tab

    /*Code*/
    /**	Help Info:
    **************************************************
      This Button will clear the desktop of all
    Application windows.
      This button is valid with M$ Windows 7
    **/
    var file = Components.classes["@mozilla.org/file/local;1"].
      createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath("C:\\WINDOWS\\ToggleDesktop.vbs");
    file.launch();
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    this.Cb = custombuttons;
    this.properties = {
    	en_US:{
    		Help: '**************************************************\n'
    		+ '  This Button will clear the desktop of all\n'
    		+ 'Application windows.\n'
    		+ '  This button is valid with M$ Windows 7\n',
    		zLast:'Last no Comma'
    	}
    };
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.style.opacity = '.99';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr, morat');
    this.setAttribute('version','20090602.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/show-desktop.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('help','0,'+this.Cb.getLocalString( this, 'Help'));
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    **************************************************
      This Button will clear the desktop of all
    Application windows.
      This button is valid with M$ Windows 7
    
  460. Show Desktop (for M$ Windows XP SP3)

    Code Tab

    /*Code*/
    /**	Help Info:
    **************************************************
      This Button will clear the desktop of all
    Application windows.
      This button only valid with M$ Windows
    **/
    const username = "Abracadabra";
    var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
    file.initWithPath("C:\\Documents and Settings\\" + username + "\\Application Data\\Microsoft\\Internet Explorer\\Quick Launch\\Show Desktop.scf");
    file.launch();
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    this.Cb = custombuttons;
    this.properties = {
    	en_US:{
    		Help: '**************************************************\n'
    		+ '  This Button will clear the desktop of all\n'
    		+ 'Application windows.\n'
    		+ '  This button only valid with M$ Windows\n',
    		zLast:'Last no Comma'
    	}
    };
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.style.opacity = '.99';" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr, morat');
    this.setAttribute('version','20090604.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/show-desktop.html');
    this.setAttribute('dependency','FF 2.0.0.*,TB 2.0.0.*,FL 1.0*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('help','0,'+this.Cb.getLocalString( this, 'Help'));
    this.tooltipText += 'in M$ Windows';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    **************************************************
      This Button will clear the desktop of all
    Application windows.
      This button only valid with M$ Windows
    
  461. Show Scripts

    Code Tab

    var test = content.document.getElementById('showScripts.css');
    if(test) test.parentNode.removeChild(test);
    else {
    var head = content.document.getElementsByTagName('head')[0];
    if(!head) return;
    var css = ('\
    html script {\
      display: block !important;\
      padding: 1em;\
      background-color: #e0e0e0;\
      border: 2px solid #aaa;\
      color: #000;\
      font-family: monospace;\
      font-size: 10pt;\
      text-align: left;\
      white-space: -moz-pre-wrap;\
      //position: absolute;\
      //opacity: .1;\
    }\
    html script:hover {\
      background-color: #eee;\
      border: 2px dashed #aaa;\
      opacity: 1;\
    }\
    ')
    var style = content.document.createElement('style');
    style.id = 'showScripts.css';
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/show-scripts.html');

    Help Tab

  462. Show/Hide ToolBars

    Code Tab

    /*Code*/

    Initialization Tab

    var n = document.getElementById("nav-bar");			// navigation bar
    var b = document.getElementById("PersonalToolbar");		// bookmarkbar
    var s = document.getElementById("status-bar");			// status bar
    var t = document.getElementsByClassName("tabbrowser-strip");	// tab browser (if needed)
    var m = document.getElementById("toolbar-menubar");		// menu bar
    this.leftclick = function(evt) {
     b.collapsed = !b.collapsed;
    };
    this.rightclick = function(evt) {
     s.collapsed = !s.collapsed;
    };
    this.midclick = function(evt) {
     gBrowser.setStripVisibilityTo(!gBrowser.getStripVisibility());
    }; this.cleftclick = function(evt) { this.midclick(evt); };
    this.leftDclick = function(evt) {
      this.displayAll(b.collapsed && s.collapsed && !gBrowser.getStripVisibility());
    }
    this.displayAll = function(boo) {
     gBrowser.setStripVisibilityTo(boo);
     b.collapsed = !boo;
     s.collapsed = !boo;
    }
    this.tooltipText="L: Bookmark bar\nM:Tab bar\nR:Status bar\ndbL:Show/Hide all";
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); 
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    this.setAttribute('author','Louis H');
    this.setAttribute('version','20090109_2330');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/showhide-toolbars-bookmark-tab-status-bar.html');
    this.setAttribute('public',true);

    Help Tab

  463. Showcase

    Code Tab

    if (event.target.localName == "toolbarbutton") {
    try {
      var targetCommand = gPrefService.getCharPref("custombuttons.showcaseButton.showcaseCommand");
      eval(targetCommand);
    } catch (e) {
      showShowcase(false, false);
    }
    }

    Initialization Tab

    function showcaseButtonMenuClicked(event) {
      var targetCommand = document.getElementById(event.target.getAttribute("command"));
      gPrefService.setCharPref("custombuttons.showcaseButton.showcaseCommand", targetCommand.getAttribute("oncommand"));
      gPrefService.setCharPref("custombuttons.showcaseButton.showcaseType", event.target.getAttribute("showcaseType"));
      event.target.parentNode.parentNode.setAttribute("showcaseType", event.target.getAttribute("showcaseType"));
    }
    function showcaseButtonSidebarMenuClicked(event) {
      gPrefService.setCharPref("custombuttons.showcaseButton.showcaseCommand", "toggleSidebar(\"" + event.target.getAttribute("targetObserver") + "\");");
      gPrefService.setCharPref("custombuttons.showcaseButton.showcaseType", event.target.getAttribute("showcaseType"));
      event.target.parentNode.parentNode.setAttribute("showcaseType", event.target.getAttribute("showcaseType"));
      toggleSidebar(event.target.getAttribute("targetObserver"));
    }
    var mPopup = document.createElement("menupopup");
    //mPopup.setAttribute("oncommand", "event.stopPropagation(); //this.parentNode.savePrefs(event)");
    try {
    this.setAttribute("showcaseType", gPrefService.getCharPref("custombuttons.showcaseButton.showcaseType"));
    } catch (e) { }
    var showcaseType = this.getAttribute("showcaseType");
    var sm = document.getElementById("menu_showcase").firstChild;
    var selectedMenuItem = null;
    for(var i = 0; i < sm.childNodes.length; i++) {
      var cmi = sm.childNodes[i];
      if (cmi.localName == "menuseparator") {
        mPopup.appendChild(document.createElement("menuseparator"));
        var mi = mPopup.appendChild(document.createElement("menuitem"));
        mi.addEventListener("click", showcaseButtonSidebarMenuClicked, false);
        mi.setAttribute("label", document.getElementById("viewShowcaseThisWindowSidebar").getAttribute("label"));
        mi.setAttribute("targetObserver", "viewShowcaseThisWindowSidebar");
        mi.setAttribute("showcaseType", "CBshowcaseThisWindowSidebarMenuItem");
        mi.setAttribute("type", "radio");
        mi.setAttribute("name", "CBShowcaseButton");
        if (mi.getAttribute("showcaseType") == showcaseType) {
          selectedMenuItem = mi;
        }
        mi = mPopup.appendChild(document.createElement("menuitem"));
        mi.addEventListener("click", showcaseButtonSidebarMenuClicked, false);
        mi.setAttribute("label", document.getElementById("viewShowcaseSidebar").getAttribute("label"));
        mi.setAttribute("targetObserver", "viewShowcaseSidebar");
        mi.setAttribute("showcaseType", "CBshowcaseSidebarMenuItem");
        mi.setAttribute("type", "radio");
        mi.setAttribute("name", "CBShowcaseButton");
        if (mi.getAttribute("showcaseType") == showcaseType) {
          selectedMenuItem = mi;
        }
        mPopup.appendChild(document.createElement("menuseparator"));
      } else {
        var mi = mPopup.appendChild(document.createElement("menuitem"));
        mi.setAttribute("label", cmi.getAttribute("label"));
        mi.setAttribute("image", cmi.getAttribute("image"));
        mi.setAttribute("command", cmi.getAttribute("command"));
        mi.setAttribute("showcaseType", "CB" + cmi.getAttribute("id"));
        if (cmi.getAttribute("id") != "showcaseOptionsMenuItem") {
          mi.setAttribute("type", "radio");
          mi.setAttribute("name", "CBShowcaseButton");
          mi.addEventListener("click", showcaseButtonMenuClicked, false);
        }
        if (mi.getAttribute("showcaseType") == showcaseType) {
          selectedMenuItem = mi;
        }
      }
    }
    this.appendChild(mPopup);
    this.type = "menu-button";
    if (selectedMenuItem != null) {
      selectedMenuItem.setAttribute("checked", true);
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/firefox-showcase-joseprio.html');

    Help Tab

  464. Showcase

    Code Tab

    if (event.target.localName == "toolbarbutton") {
    try {
      var targetCommand = gPrefService.getCharPref("custombuttons.showcaseButton.showcaseCommand");
      eval(targetCommand);
    } catch (e) {
      showShowcase(false, false);
    }
    }

    Initialization Tab

    function showcaseButtonMenuClicked(event) {
      var targetCommand = document.getElementById(event.target.getAttribute("command"));
      gPrefService.setCharPref("custombuttons.showcaseButton.showcaseCommand", targetCommand.getAttribute("oncommand"));
      gPrefService.setCharPref("custombuttons.showcaseButton.showcaseType", event.target.getAttribute("showcaseType"));
      event.target.parentNode.parentNode.setAttribute("showcaseType", event.target.getAttribute("showcaseType"));
    }
    function showcaseButtonSidebarMenuClicked(event) {
      gPrefService.setCharPref("custombuttons.showcaseButton.showcaseCommand", "toggleSidebar(\"" + event.target.getAttribute("targetObserver") + "\");");
      gPrefService.setCharPref("custombuttons.showcaseButton.showcaseType", event.target.getAttribute("showcaseType"));
      event.target.parentNode.parentNode.setAttribute("showcaseType", event.target.getAttribute("showcaseType"));
      toggleSidebar(event.target.getAttribute("targetObserver"));
    }
    var mPopup = document.createElement("menupopup");
    //mPopup.setAttribute("oncommand", "event.stopPropagation(); //this.parentNode.savePrefs(event)");
    try {
    this.setAttribute("showcaseType", gPrefService.getCharPref("custombuttons.showcaseButton.showcaseType"));
    } catch (e) { }
    var showcaseType = this.getAttribute("showcaseType");
    var sm = document.getElementById("menu_showcase").firstChild;
    var selectedMenuItem = null;
    for(var i = 0; i < sm.childNodes.length; i++) {
      var cmi = sm.childNodes[i];
      if (cmi.localName == "menuseparator") {
        mPopup.appendChild(document.createElement("menuseparator"));
        var mi = mPopup.appendChild(document.createElement("menuitem"));
        mi.addEventListener("click", showcaseButtonSidebarMenuClicked, false);
        mi.setAttribute("label", document.getElementById("viewShowcaseThisWindowSidebar").getAttribute("label"));
        mi.setAttribute("targetObserver", "viewShowcaseThisWindowSidebar");
        mi.setAttribute("showcaseType", "CBshowcaseThisWindowSidebarMenuItem");
        mi.setAttribute("type", "radio");
        mi.setAttribute("name", "CBShowcaseButton");
        if (mi.getAttribute("showcaseType") == showcaseType) {
          selectedMenuItem = mi;
        }
        mi = mPopup.appendChild(document.createElement("menuitem"));
        mi.addEventListener("click", showcaseButtonSidebarMenuClicked, false);
        mi.setAttribute("label", document.getElementById("viewShowcaseSidebar").getAttribute("label"));
        mi.setAttribute("targetObserver", "viewShowcaseSidebar");
        mi.setAttribute("showcaseType", "CBshowcaseSidebarMenuItem");
        mi.setAttribute("type", "radio");
        mi.setAttribute("name", "CBShowcaseButton");
        if (mi.getAttribute("showcaseType") == showcaseType) {
          selectedMenuItem = mi;
        }
        mPopup.appendChild(document.createElement("menuseparator"));
      } else {
        var mi = mPopup.appendChild(document.createElement("menuitem"));
        mi.setAttribute("label", cmi.getAttribute("label"));
        mi.setAttribute("image", cmi.getAttribute("image"));
        mi.setAttribute("command", cmi.getAttribute("command"));
        mi.setAttribute("showcaseType", "CB" + cmi.getAttribute("id"));
        if (cmi.getAttribute("id") != "showcaseOptionsMenuItem") {
          mi.setAttribute("type", "radio");
          mi.setAttribute("name", "CBShowcaseButton");
          mi.addEventListener("click", showcaseButtonMenuClicked, false);
        }
        if (mi.getAttribute("showcaseType") == showcaseType) {
          selectedMenuItem = mi;
        }
      }
    }
    this.appendChild(mPopup);
    this.type = "menu-button";
    if (selectedMenuItem != null) {
      selectedMenuItem.setAttribute("checked", true);
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/firefox-showcase-joseprio.html');

    Help Tab

  465. Showcase

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.textResize = function(evt) {
      if(evt.button == 0 && !evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		showShowcaseThisWindow('event');}
      else if(evt.button == 0 && evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		showShowcaseAllWindows('event');}
      else if(evt.button == 0 && !evt.shiftKey && evt.ctrlKey && !evt.altKey) {
                        showShowcaseOptions();}
      else if(evt.button == 1 && !evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		showShowcaseTabThisWindow('event');}
      else if(evt.button == 1 && evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		showShowcaseTabAllWindows('event');}
      else if(evt.button == 1 && !evt.shiftKey && evt.ctrlKey && !evt.altKey) {
                    showShowcaseOptions();}
      else if(evt.button == 2 && !evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		 toggleSidebar('viewShowcaseThisWindowSidebar');}
      else if(evt.button == 2 && evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		toggleSidebar('viewShowcaseSidebar');}
      else if(evt.button == 2 && !evt.shiftKey && evt.ctrlKey && !evt.altKey) {
               this.showPopup(this); }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.textResize(event);");
    this.setAttribute("context", "");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','KuRmA');
    this.setAttribute('version','20060815.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/firefox-showcase-kurma.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  466. Showcase

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.textResize = function(evt) {
      if(evt.button == 0 && !evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		showShowcaseThisWindow('event');}
      else if(evt.button == 0 && evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		showShowcaseAllWindows('event');}
      else if(evt.button == 0 && !evt.shiftKey && evt.ctrlKey && !evt.altKey) {
                        showShowcaseOptions();}
      else if(evt.button == 1 && !evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		showShowcaseTabThisWindow('event');}
      else if(evt.button == 1 && evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		showShowcaseTabAllWindows('event');}
      else if(evt.button == 1 && !evt.shiftKey && evt.ctrlKey && !evt.altKey) {
                    showShowcaseOptions();}
      else if(evt.button == 2 && !evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		 toggleSidebar('viewShowcaseThisWindowSidebar');}
      else if(evt.button == 2 && evt.shiftKey && !evt.ctrlKey && !evt.altKey) {
    		toggleSidebar('viewShowcaseSidebar');}
      else if(evt.button == 2 && !evt.shiftKey && evt.ctrlKey && !evt.altKey) {
               this.showPopup(this); }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.textResize(event);");
    this.setAttribute("context", "");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','KuRmA');
    this.setAttribute('version','20060815.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/firefox-showcase-kurma.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  467. Sidebar

    Code Tab

    /* -------------------------------------------------------------
         Sidebar Menu Button (beta)
         by LouCypher (aka Zoolcar9)
         modified and enhanced by Arthur
         Toggle Sidebar
       ------------------------------------------------------------- */
    if (!this.use_menu_button && this.exchange_left_middle)
    	this.showPopup(this);
    else
    	this.toggleSidebar();
    

    Initialization Tab

    // set this to true, to get a message with default sidebars ids, very useful to sort them
    const output_msg=false;
    // change the following to customize the button
    this.use_menu_button = false;
    this.exchange_left_middle = true; //ignored, if use_menu_button == true
    //*************************************************************************
    // Helpers used at runtime
    this.toggleSidebar = function() {
      var prefString = "custombuttons.toggleSidebar.sidebarCommand";
      var sidebarCmd = document.getElementById("sidebar-box").getAttribute("sidebarcommand");
      if(!sidebarCmd) {
        try {
          sidebarCmd = gPrefService.getCharPref(prefString);
        } catch(ex) {
          sidebarCmd = "viewHistorySidebar";
        }
      }
      gPrefService.setCharPref(prefString, sidebarCmd);
      toggleSidebar(sidebarCmd);
    }
    this.savePrefs = function(aEvent) {
      var prefString = "custombuttons.toggleSidebar.sidebarCommand";
      gPrefService.setCharPref(prefString, aEvent.target.getAttribute("observes"));
    }
    this.getSBURI = function() {
      var r=false;
      var d=document.getElementById("sidebar").contentDocument;
      if (d)
      {
        var e=d.getElementById("web-panels-browser");
        if (e)
          r=e.currentURI.spec;
        else
          r=d.location.href;
      }
      return r;
    }
    this.getCurrentURI = function() {
      return document.getElementById("content").webNavigation.currentURI.spec;
    }
    this.getCurrentTitle = function() {
      return document.getElementById("content").webNavigation.document.title;
    }
    //*************************************************************************
    // Helpers used at initialization
    function addSidebar(aID, aLabel, aURL) {
    	var bs = document.getElementById(aID);
    	if(bs) bs.parentNode.removeChild(bs);    
    	var newSidebar = document.getElementById("mainBroadcasterSet")
    		.appendChild(document.createElement("broadcaster"));
    	newSidebar.id = aID;
    	newSidebar.setAttribute("label", aLabel);
    	newSidebar.setAttribute("sidebarurl", aURL);
    	newSidebar.setAttribute("oncommand", "toggleSidebar('" + aID + "');");
    	newSidebar.setAttribute("type", "checkbox");
    	newSidebar.setAttribute("group", "sidebar");
    	newSidebar.setAttribute("autoCheck", "false");
    }
    function addCommand(aLabel, aNR, aCommand, aMiddleClickCommand) {
    	var item = mPopup.appendChild(document.createElement("menuitem"));
    	item.id="sidebar-button-command-" + aNR;
    	item.setAttribute("label", aLabel);
    	item.setAttribute("oncommand", aCommand);
    	if (aMiddleClickCommand==true)
    		item.setAttribute("onclick", "if (event.button==1) { " + aCommand +" };");
    	else if (aMiddleClickCommand)
    		item.setAttribute("onclick", "if (event.button==1) { " + aMiddleClickCommand +" };");
    	item.setAttribute("style", "-moz-box-ordinal-group: "+aNR+";");
    }
    function addSep(aNR) {
    	var sep = mPopup.appendChild(document.createElement("menuseparator"));
    	sep.id="sidebar-button-separator-" + aNR
    	sep.setAttribute("style", "-moz-box-ordinal-group: "+aNR+";");
    }
    function sortItem(aID, aNR) {
    	document.getElementById(aID).setAttribute("style", "-moz-box-ordinal-group: "+aNR+";");
    }
    //*************************************************************************
    // Add some sidebars via URI
    if (!output_msg) {
    //Downloads Manager
    addSidebar("downloadMgrSidebar", "Download Manager", "chrome://mozapps/content/downloads/downloads.xul");
    //Extensions
    addSidebar("viewAddonsSidebar", "Add-ons","chrome://mozapps/content/extensions/extensions.xul");
    //Cookie Manager
    addSidebar("CookiesDialog","Cookie Manager","chrome://browser/content/preferences/cookies.xul");
    //Password Manager
    addSidebar("SignonViewerDialog","Password Manager","chrome://passwordmgr/content/passwordManager.xul");
    //JavaScript-Console
    addSidebar("JSConsoleWindow","JavaScript-Console","chrome://global/content/console.xul");
    //LiveHTTPHeaders-Dialog
    addSidebar("LiveHTTPHeaders","LiveHTTPHeaders-Dialog","chrome://livehttpheaders/content/LiveHTTPHeaders.xul");
    //Google Sidebar
    addSidebar("google", "Google Sidebar", "http://www.google.com/mozilla/google.xul2");
    };
    //*************************************************************************
    // Initialize menu and add default and just added sidebars 
    var sortnr=1;
    var mPopup = document.createElement("menupopup");
    //mPopup.savePrefs = savePrefs.bind(this);
    mPopup.setAttribute("oncommand", "event.stopPropagation(); this.parentNode.savePrefs(event);");
    var sb = document.getElementById("mainBroadcasterSet");
    var bc = sb.getElementsByTagName("broadcaster");
    var msg="";
    for(var i = 0; i < bc.length; i++) {
      var bci = bc[i];
      if((bci.hasAttribute("group") && (bci.getAttribute("group") == "sidebar"))
      && (bci.hasAttribute("label") || bci.hasAttribute("sidebartitle"))
      && (bci.hasAttribute("oncommand"))
      && (!bci.hasAttribute("command"))) {
        var mi = mPopup.appendChild(document.createElement("menuitem"));
        mi.setAttribute("observes", bci.getAttribute("id"));
        if (output_msg)
          msg=msg+i+": "+bci.getAttribute("id")+"\n";
        if(!bci.hasAttribute("label"))
          bci.setAttribute("label", bci.getAttribute("sidebartitle"));
      }
    }
    if (output_msg)
      alert(msg);
    //*************************************************************************
    // Sort menu, add separators and additional commands
    if (!output_msg) {
    // first fix something:
    var sb=document.getElementById("sidebar");
    if (sb)
      sb.setAttribute("style","min-width: 100px; width: 295px; max-width: 800px;");
    addCommand("XXS Sidebar width",sortnr++,
    	"var sb = document.getElementById('sidebar-box'); " +
    	"if (sb) {" +
    		"if (sb.getAttribute('hidden')=='true') this.parentNode.parentNode.toggleSidebar();" +
    		"sb.setAttribute('width','100px');" +
    	"};",true);
    addCommand("min Sidebar width",sortnr++,
    	"var sb = document.getElementById('sidebar-box'); " +
    	"if (sb) {" +
    		"if (sb.getAttribute('hidden')=='true') this.parentNode.parentNode.toggleSidebar();" +
    		"sb.setAttribute('width','196px');" +
    	"};",true);
    addCommand("def Sidebar width",sortnr++,
    	"var sb = document.getElementById('sidebar-box'); " +
    	"if (sb) {" +
    		"if (sb.getAttribute('hidden')=='true') this.parentNode.parentNode.toggleSidebar();" +
    		"sb.setAttribute('width','295px');" +
    	"};",true);
    addCommand("max Sidebar width",sortnr++,
    	"var sb = document.getElementById('sidebar-box'); " +
    	"if (sb) {" +
    		"if (sb.getAttribute('hidden')=='true') this.parentNode.parentNode.toggleSidebar();" +
    		"sb.setAttribute('width','600px');" +
    	"};",true);
    addCommand("XXL Sidebar width",sortnr++,
    	"var sb = document.getElementById('sidebar-box'); " +
    	"if (sb) {" +
    		"if (sb.getAttribute('hidden')=='true') this.parentNode.parentNode.toggleSidebar();" +
    		"sb.setAttribute('width','800px');" +
    	"};",true);
    addSep(sortnr++);
    var minsbstr=	"this.parentNode.hidePopup();" +
    		"var sb = document.getElementById('sidebar-box'); " +
    		"if (sb) {" +
    			"if (sb.getAttribute('hidden')=='true') this.parentNode.parentNode.toggleSidebar();" +
    			"sb.setAttribute('width','196px');" +
    		"};"
    var maxsbstr=	"this.parentNode.hidePopup();" +
    		"var sb = document.getElementById('sidebar-box'); " +
    		"if (sb) {" +
    			"if (sb.getAttribute('hidden')=='true') this.parentNode.parentNode.toggleSidebar();" +
    			"sb.setAttribute('width','600px');" +
    		"};"
    var octisstr=	"var url = this.parentNode.parentNode.getCurrentURI(); " +
    		"var name = this.parentNode.parentNode.getCurrentTitle(); " +
    		"if (!name) name='no titel';" +
    		"if (url) {" +
    			"openWebPanel(name, decodeURI(url));" +
    		"};"
    var mcttsstr=	"var url = this.parentNode.parentNode.getCurrentURI(); " +
    		"var name = this.parentNode.parentNode.getCurrentTitle(); " +
    		"if (!name) name='no titel';" +
    		"if (url) {" +
    			"openWebPanel(name, decodeURI(url));" +
    			"document.getElementById('content').removeCurrentTab();" +
    		"};"
    addCommand("Open current Tab in Sidebar",sortnr++,octisstr,maxsbstr+octisstr);
    addCommand("Move current Tab to Sidebar",sortnr++,mcttsstr,maxsbstr+mcttsstr);
    addSep(sortnr++);
    var osintstr=	"var url=this.parentNode.parentNode.getSBURI();" +
    		"if (url) {" +
    			"var newtab=document.getElementById('content').addTab(decodeURI(url));" +
    			"if (newtab) {" +
    				"document.getElementById('content').selectedTab=newtab;" +
    		"}};"
    var osictstr=	"var url=this.parentNode.parentNode.getSBURI();" +
    		"if (url) {" +
    			"document.getElementById('content').loadURI(decodeURI(url));" +
    		"};"
    addCommand("Open Sidebar in new Tab",sortnr++,
    	osintstr,minsbstr+osintstr+"toggleSidebar('viewScrapBookSidebar');");
    addCommand("Open Sidebar in current Tab",sortnr++,
    	osictstr,minsbstr+osictstr+"toggleSidebar('viewScrapBookSidebar');");
    addSep(sortnr++);
    sortItem("viewminimap",sortnr++);
    addSep(sortnr++);
    sortItem("viewHistorySidebar",sortnr++);
    sortItem("viewScrapBookSidebar",sortnr++);
    sortItem("feedbar",sortnr++);
    sortItem("viewBookmarksSidebar",sortnr++);
    addSep(sortnr++);
    sortItem("downloadMgrSidebar",sortnr++);
    addSep(sortnr++);
    sortItem("viewAddonsSidebar",sortnr++);
    sortItem("CookiesDialog",sortnr++);
    sortItem("SignonViewerDialog",sortnr++);
    addSep(sortnr++);
    sortItem("JSConsoleWindow",sortnr++);
    sortItem("viewLiveHTTPSidebar",sortnr++);
    sortItem("LiveHTTPHeaders",sortnr++);
    addSep(sortnr++);
    sortItem("google",sortnr++);
    addSep(sortnr++);
    addCommand("close this menu",sortnr++,"",false);
    };
    //*************************************************************************
    //and finally use the menu with the button
    this.appendChild(mPopup);
    if (this.use_menu_button) {
    	this.type = "menu-button";
    } else {
    	this.showPopup = function(aNode) {
    		var popup = aNode.getElementsByTagName("menupopup")[0];
    		var x = aNode.boxObject.x;
    		var y = aNode.boxObject.y + aNode.boxObject.height;
    		document.popupNode = aNode;
    		popup.showPopup(aNode, x, y, "popup", null, null);
    	}
    	mPopup.id = "custombuttons-sidebar-button-menupopup";
    	if (this.exchange_left_middle)
    		this.setAttribute("onclick", 
    			"if(event.button==1 && event.target.id.substring(0,20)=='custombuttons-button') " +
    			"this.toggleSidebar();");
    	else
    		this.setAttribute("onclick", "if(event.button==1) this.showPopup(this);");
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sidebar-menu-button-highly-configurable.html');

    Help Tab

  468. Sidebar

    Code Tab

    /* -------------------------------------------------------------
         Sidebar Menu Button (beta)
         by LouCypher (aka Zoolcar9)
         Toggle Sidebar
       ------------------------------------------------------------- */
    this.toggleSidebar();
    

    Initialization Tab

    this.toggleSidebar = function() {
      var prefString = "custombuttons.toggleSidebar.sidebarCommand";
      var sidebarCmd = document.getElementById("sidebar-box").getAttribute("sidebarcommand");
      if(!sidebarCmd) {
        try {
          sidebarCmd = gPrefService.getCharPref(prefString);
        } catch(ex) {
          sidebarCmd = "viewBookmarksSidebar";
        }
      }
      gPrefService.setCharPref(prefString, sidebarCmd);
      toggleSidebar(sidebarCmd);
    }
    this.savePrefs = function(aEvent) {
      var prefString = "custombuttons.toggleSidebar.sidebarCommand";
      gPrefService.setCharPref(prefString, aEvent.target.getAttribute("observes"));
    }
    this.getBookmark = function() {
      var rv = { urls: null, names: null };
      openDialog("chrome://browser/content/bookmarks/selectBookmark.xul",
                           "", "modal, centerscreen, resizable", rv);
      return rv;
    }
    function addSidebar(aID, aLabel, aURL) {
      var bs = document.getElementById(aID);
      if(bs) bs.parentNode.removeChild(bs);    
      var newSidebar = document.getElementById("mainBroadcasterSet")
                        .appendChild(document.createElement("broadcaster"));
      newSidebar.id = aID;
      newSidebar.setAttribute("label", aLabel);
      newSidebar.setAttribute("sidebarurl", aURL);
      newSidebar.setAttribute("oncommand", "toggleSidebar('" + aID + "')");
      newSidebar.setAttribute("type", "checkbox");
      newSidebar.setAttribute("group", "sidebar");
      newSidebar.setAttribute("autoCheck", "false");
    }
    if(typeof BrowserOpenAddonsMgr == "function") {
      addSidebar("viewAddonsSidebar", "Add-ons",
                 "chrome://mozapps/content/extensions/extensions.xul");
    } else {
      addSidebar("viewExtensionsSidebar", "Extensions",
                 "chrome://mozapps/content/extensions/extensions.xul?type=extensions");
      addSidebar("viewThemesSidebar", "Themes",
                 "chrome://mozapps/content/extensions/extensions.xul?type=themes");
    }
    var mPopup = document.createElement("menupopup");
    //mPopup.savePrefs = savePrefs.bind(this);
    mPopup.setAttribute("oncommand", "event.stopPropagation(); this.parentNode.savePrefs(event)");
    var sb = document.getElementById("mainBroadcasterSet");
    var bc = sb.getElementsByTagName("broadcaster");
    for(var i = 0; i < bc.length; i++) {
      var bci = bc[i];
      if((bci.hasAttribute("group") && (bci.getAttribute("group") == "sidebar"))
      && (bci.hasAttribute("label") || bci.hasAttribute("sidebartitle"))
      && (bci.hasAttribute("oncommand"))
      && (!bci.hasAttribute("command"))) {
        var mi = mPopup.appendChild(document.createElement("menuitem"));
        mi.setAttribute("observes", bci.getAttribute("id"));
        mi.id = "sbm" + bci.getAttribute("id");
        if(!bci.hasAttribute("label"))
          bci.setAttribute("label", bci.getAttribute("sidebartitle"));
      }
    }
    var sep = mPopup.appendChild(document.createElement("menuseparator"));
    sep.id = "sidebar-button-separator";
    var bmItem = mPopup.appendChild(document.createElement("menuitem"));
    bmItem.setAttribute("label", "From Bookmarks");
    bmItem.setAttribute("oncommand",
    	"var bm = this.parentNode.parentNode.getBookmark(); " +
    	"if (bm.urls && bm.names) " +
    	"openWebPanel(bm.names[0], bm.urls[0]);");
    bmItem.id = "sbmfromBookmarks";
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.setAttribute('author','LouCypher,nicholas');
    this.setAttribute('version','20081105.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sidebar-menu-button.html');
    this.setAttribute('dependency','FF3.0*, FL1.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  469. sign

    Code Tab

    /*Code*/
    var CarriageReturnAndNewLine = "\r\n";
    var CR = CarriageReturnAndNewLine;
      var line0 = "-- \r\n";
      var line1 = "Ryan";
      var line2 = "<ryan@tingsys.com>";
        text = line0 + line1 + CR + line2;
          custombuttons.gClipboard.write(text);
          goDoCommand('cmd_paste');aste');

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/thunderbird-signature.html');

    Help Tab

    /* +++----------------------- help information for this button -----------------------+++ */
    No help developed for 
    <label> button
    custombuttons-button<id>.
    
  470. Simple Sidebar Button - Diigo

    Code Tab

    /*Code*/

    Initialization Tab

    /*---------------------- User Definable Options -------------------------*/
      var expectedURI = "chrome://diigotb/content/sidebar.html";
      this.leftclick = function(event){
        diigo.handle("toggleSidebar");
      }
    /*---------------------- Functions -------------------------*/
      var me = this; // Rename "this" so we can access inside of "non-this" functions.
      function syncButtonStatusToSidebarURI() {
        if (sidebar.contentDocument.documentURI == expectedURI)
        {
          me.setAttribute("checked", true);
          me.style.opacity = "0.99";
        }
        else
        {
          me.removeAttribute("checked");
          me.style.opacity = "0.65";
        }
      }
    /*---------------------- Event Handlers ----------------------*/
      //Listen for changes to the sidebar content.
      var sidebar = document.getElementById("sidebar");
      var buttonID = custombuttons.getNumber(this.id)
      var elementToWatch = "cb2Listener" + buttonID; // Need a unique name for listener.
      custombuttons.listeners.elementToWatch = sidebar;
      custombuttons.listeners.elementToWatch.addEventListener("pageshow", syncButtonStatusToSidebarURI, true);
      //Listen for click events.
      this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
      //Brighten/Dim on mouse in/out.
      this.setAttribute("onmouseover", "if (this.checked == false) custombuttons.ButtonBrt(event);"); 
      this.setAttribute("onmouseout", "if (this.checked == false) custombuttons.ButtonDim(event);"); 
    /*---------------------- Button Properties ----------------------*/
      this.setAttribute("author", "GollyJer");
      this.setAttribute("version", "1.0");
      this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/simple-sidebar-buttons.html');
      this.setAttribute("dependency", "No idea.  Works for me in FF3. :-)");
      this.setAttribute("status", "Complete");
      this.setAttribute("public", true);
      this.style.opacity = "0.65";
      this.tooltipText = "Toggle Diigo Sidebar.";
    //Sync button status when Firefox starts, i.e.- when the button is initialized.
      syncButtonStatusToSidebarURI()

    Help Tab

    Toggles the Diigo Sidebar.
  471. Simple Sidebar Button - Ping.fm Mobile

    Code Tab

    Initialization Tab

    /*---------------------- User Definable Options -------------------------*/
      var expectedURI = "http://ping.fm/m/"
      this.leftclick = function(event){
        sidebar.loadURI(expectedURI);
      }
    /*---------------------- Functions -------------------------*/
      var me = this; // Rename "this" so we can access inside of "non-this" functions.
      function syncButtonStatusToSidebarURI() {
        if (sidebar.contentDocument.documentURI.indexOf(expectedURI) == 0)
        {
          me.setAttribute("checked", true);
          me.style.opacity = "0.99";
        }
        else
        {
          me.removeAttribute("checked");
          me.style.opacity = "0.65";
        }
      }
    /*---------------------- Event Handlers ----------------------*/
      //Listen for changes to the sidebar content.
      var sidebar = document.getElementById("sidebar");
      var buttonID = custombuttons.getNumber(this.id)
      var elementToWatch = "cb2Listener" + buttonID; // Need a unique name for listener.
      custombuttons.listeners.elementToWatch = sidebar;
      custombuttons.listeners.elementToWatch.addEventListener("pageshow", syncButtonStatusToSidebarURI, true);
      //Listen for click events.
      this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
      //Brighten/Dim on mouse in/out.
      this.setAttribute("onmouseover", "if (this.checked == false) custombuttons.ButtonBrt(event);"); 
      this.setAttribute("onmouseout", "if (this.checked == false) custombuttons.ButtonDim(event);"); 
    /*---------------------- Button Properties ----------------------*/
      this.setAttribute("author", "GollyJer");
      this.setAttribute("version", "1.0");
      this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/simple-sidebar-buttons.html');
      this.setAttribute("status", "Complete");
      this.setAttribute("public", true);
      this.style.opacity = "0.65";
      this.tooltipText = 'Toggle Ping.fm Mobile.';
    //Sync button status when Firefox starts, i.e.- when the button is initialized.
      syncButtonStatusToSidebarURI()

    Help Tab

  472. Simple Sidebar Button - Ping.fm Mobile

    Code Tab

    Initialization Tab

    /*---------------------- User Definable Options -------------------------*/
      var expectedURI = "http://ping.fm/m/"
      this.leftclick = function(event){
        sidebar.loadURI(expectedURI);
      }
    /*---------------------- Functions -------------------------*/
      var me = this; // Rename "this" so we can access inside of "non-this" functions.
      function syncButtonStatusToSidebarURI() {
        if (sidebar.contentDocument.documentURI.indexOf(expectedURI) == 0)
        {
          me.setAttribute("checked", true);
          me.style.opacity = "0.99";
        }
        else
        {
          me.removeAttribute("checked");
          me.style.opacity = "0.65";
        }
      }
    /*---------------------- Event Handlers ----------------------*/
      //Listen for changes to the sidebar content.
      var sidebar = document.getElementById("sidebar");
      var buttonID = custombuttons.getNumber(this.id)
      var elementToWatch = "cb2Listener" + buttonID; // Need a unique name for listener.
      custombuttons.listeners.elementToWatch = sidebar;
      custombuttons.listeners.elementToWatch.addEventListener("pageshow", syncButtonStatusToSidebarURI, true);
      //Listen for click events.
      this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
      //Brighten/Dim on mouse in/out.
      this.setAttribute("onmouseover", "if (this.checked == false) custombuttons.ButtonBrt(event);"); 
      this.setAttribute("onmouseout", "if (this.checked == false) custombuttons.ButtonDim(event);"); 
    /*---------------------- Button Properties ----------------------*/
      this.setAttribute("author", "GollyJer");
      this.setAttribute("version", "1.0");
      this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/simple-sidebar-buttons.html');
      this.setAttribute("status", "Complete");
      this.setAttribute("public", true);
      this.style.opacity = "0.65";
      this.tooltipText = 'Toggle Ping.fm Mobile.';
    //Sync button status when Firefox starts, i.e.- when the button is initialized.
      syncButtonStatusToSidebarURI()

    Help Tab

  473. Simple Sidebar Button - Stylish

    Code Tab

    Initialization Tab

    /*---------------------- User Definable Options -------------------------*/
      var expectedURI = "chrome://stylish/"
      this.leftclick = function(event){
        toggleSidebar('viewStylishSidebar');
      }
    /*---------------------- Functions -------------------------*/
      var me = this; // Rename "this" so we can access inside of "non-this" functions.
      function syncButtonStatusToSidebarURI() {
        if (sidebar.contentDocument.documentURI.indexOf(expectedURI) == 0)
        {
          me.setAttribute("checked", true);
          me.style.opacity = "0.99";
        }
        else
        {
          me.removeAttribute("checked");
          me.style.opacity = "0.65";
        }
      }
    /*---------------------- Event Handlers ----------------------*/
      //Listen for changes to the sidebar content.
      var sidebar = document.getElementById("sidebar");
      var buttonID = custombuttons.getNumber(this.id)
      var elementToWatch = "cb2Listener" + buttonID; // Need a unique name for listener.
      custombuttons.listeners.elementToWatch = sidebar;
      custombuttons.listeners.elementToWatch.addEventListener("pageshow", syncButtonStatusToSidebarURI, true);
      //Listen for click events.
      this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
      //Brighten/Dim on mouse in/out.
      this.setAttribute("onmouseover", "if (this.checked == false) custombuttons.ButtonBrt(event);"); 
      this.setAttribute("onmouseout", "if (this.checked == false) custombuttons.ButtonDim(event);"); 
    /*---------------------- Button Properties ----------------------*/
      this.setAttribute("author", "GollyJer");
      this.setAttribute("version", "1.0");
      this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/simple-sidebar-buttons.html');
      this.setAttribute("status", "Complete");
      this.setAttribute("public", true);
      this.style.opacity = "0.65";
      this.tooltipText = 'Toggle Stylish browser.';
    //Sync button status when Firefox starts, i.e.- when the button is initialized.
      syncButtonStatusToSidebarURI()

    Help Tab

    /*Help*/
    Left-click: Open Stylish Stylish
    Middle-click: Open Stylish Window
    Right-click: Context Menu
    
  474. Split Browser to...

    Code Tab

    /*Code*/
    /* -------------------------------------------------------------
         Split Browser Menu Button
         by LouCypher (aka Zoolcar9)
         This button requres Split Browser extension
         http://piro.sakura.ne.jp/xul/_splitbrowser.html.en
       ------------------------------------------------------------- */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if(typeof SplitBrowser != "object") {
      var ext = "Split Browser";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this._SplitBrowser = function(aPosition) {
      var url;
      var win = document.commandDispatcher.focusedWindow;
      if (win.document == "[object XULDocument]")
        url = content.location.href;
      else
        //url = win.top.location.href;
        url = win.document.location.href;
      SplitBrowser.addSubBrowser(url, null, aPosition);
      //close current tab if "Close tab after it is split..." option is checked
      if (nsPreferences.getBoolPref("splitbrowser.tab.closetab") == true)
        gBrowser.removeTab(gBrowser.mCurrentTab);
    }
    var attr = [
      { label: "Above", pos: "TOP" },
      { label: "Right", pos: "RIGHT" },
      { label: "Left",  pos: "LEFT" },
      { label: "Below", pos: "BOTTOM" }
    ];
    var mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute("oncommand", "event.stopPropagation();");
    for (var i = 0; i < attr.length; i++) {
      var mi = mPopup.appendChild(document.createElement("menuitem"));
      mi.setAttribute("label", attr[i].label);
      mi.setAttribute("oncommand",
        "this.parentNode.parentNode._SplitBrowser(SplitBrowser.POSITION_" +
        attr[i].pos + ");");
    }
    var separator = mPopup.appendChild(document.createElement("menuseparator"));
    separator.id = "custombutton-splitBrowser-separator";
    var option = mPopup.appendChild(document.createElement("menuitem"));
    option.setAttribute("label", "Options");
    option.setAttribute("oncommand",
      "openDialog('chrome://splitbrowser/content/config.xul', '', 'toolbar, minimizable');");
    this.type = "menu";
    this.setAttribute("onclick",
                        "if (event.button == 1) " +
                        "SplitBrowser.removeAllSubBrowsers();");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','20070112.03');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/split-browser-extension-custom-button.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

  475. Start Page

    Code Tab

    goDoCommand('cmd_goStartPage');

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080724.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/thunderbird-mail-start-page.html');
    this.setAttribute('dependency','TB2.0*, CB2 2.0.6*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  476. Status Bar

    Code Tab

    goToggleToolbar('status-bar','toggle_taskbar');

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-toolbars.html');

    Help Tab

  477. Stop

    Code Tab

    BrowserStop();

    Initialization Tab

    this.tooltipText = "Stop";
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','2');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stop-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

  478. Stop

    Code Tab

    window.stop()
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stop-button.html-0');

    Help Tab

  479. Stop & Stop All Tabs All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
    BrowserStop();
    }
    this.rightclick = function() {
      var l = gBrowser.mPanelContainer.childNodes.length;
      for (var i = 0; i < l; i++) {
        try {
          gBrowser.getBrowserAtIndex(i).webNavigation.stop(nsIWebNavigation.STOP_ALL);
        } catch (e) {
        }
      }
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Stop|M: Menu|R: Stop All Tabs";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080927.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stop-stop-all-tabs-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    null
  480. Stop All Tabs

    Code Tab

    this.stopAllTabs();

    Initialization Tab

    this.stopAllTabs = function() {
      var l = gBrowser.mPanelContainer.childNodes.length;
      for (var i = 0; i < l; i++) {
        try {
          gBrowser.getBrowserAtIndex(i).webNavigation.stop(nsIWebNavigation.STOP_ALL);
        } catch (e) {
        }
      }
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stop-all-tabs.html');

    Help Tab

  481. Stop/Reload

    Code Tab

    if(this.isReload){
      BrowserReload()
    }else{
      BrowserStop();
    }
    this.setButton();

    Initialization Tab

    this.isReload=false;
    /*var stopImg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANbY1E9YMgAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAApZJREFUeNp1k01IVFEYhp977tyhcaaZEZvSAhViMmlaFMi4iImEFmHgbgqUVlFQmiHRoqCoIFpEtDSEcKG0sqBFWf5htcgWSVERmSSUjn936o6euc69c+e2sBGN+nbfeXmfw/nO9ypsrChQxv9LBybWHyjrm4Eww+omX1zbVgFu4Y8qEKpgJTVNwTTHDv+i4Z+AgTDDajAUj3U9xJpfwF5eopB3KBgZXCePbSwz++AuBTO7AaIUzVowFK/t7CM9OoJtZEBVV0VFAdcFjwdV85Lq3QgRa+Z7fSw+78cFXMtGEQKEWL3G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ZQ+p+E8fvNrdxNU/2wAUMfBLh+gxDg1uS9VM/L3AXTdAVxWkXsM9ZR2oUULA9gJShs5LTzazIRn9P7VGWN07uL2j/fxVk7sBRIET11zc0yfyZH8t88TzqQe2b92wuaUGqQg8JCUnWANo1F4PVJ2/imWiusqFXAUOvHuM8ugwUKA493Iu9v5Hua5GqIuwqbmGYiBWAfFErP1y2eUfK0SLReGHI5coj74H5Hlh9BGEs49mAwIVrIBs1WVj62r1mqPCuaIHdoA7XwLLygFX6DuYwsl/CXRy8eZ9bR8/uXpr4ZXbkrY0lDywbWjc1MX6kQjn3rSAN1h+S8j9UgAnmRxSFGZm51AkeFVQFOhoy3CnOExiUJFSTpP6+DZbvsrUf3Y50/31TOtj392IJN8545DeXzRNMxTw6HB8//dDFU9CvgRNtVAsQv7GFK4yQ5Oup3ZuXGxvjV/XfHdej4ib4weP32Liw99M07Q0uHSo8u3RF3d++lZ63PbAqUI65ZPp7CR0jfR6vWCETohbqUWRtZOnc/VMHM3+tw9UYIHSuHXtVvdTW57pjRbqorAYgEpgJCJegybdhrrIkqZKd/rCdVke+WIaJs9KKR3XdRFSSoQQ64B+mve9nXhtYDMPdpJoNDBCz65TnVI5O1vIn/p9jvGRkzB1DChKKaVlWayOaRmSgeizKDueJhpL4vtL+NV7yPnzMDUG/AHcWZm0ZVn8C2YPaqnkRnyEAAAAAElFTkSuQmCC';
    */
    this.makeReload=function(){
      this.isReload=true;
      this.label="Reload";
      this.image='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANbY1E9YMgAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAx1JREFUeNpVk01sFHUYxn//+djd7pbOln4u/chSrVLELTExpvIRTYiaaCQxajENF43l1ujBi8aDBo0aLyUaMT2gIRpI8GJqEJIiNBJqkGBFmq2yWyiUwi7dnYHpdmZ2Zv4eam15Tu/l+SXP++QRUkpWJITQAQNIAhoQAgFgAxbgyjUG27bRWKs9Yw1o6iu01fZrMaXXr4YKS9UFFv2z2MFhdH4GpNh7ZhuqGDKHe/vFClD0j+3iofoDA4+39EQUQUKHqi8pO1VKFZ/J+QrFrHmEin+YVPwbbNczP9/ariybT+16eEf7j5/s7uoRgY9pO8yWlyjYLn4Q0hDTeK7boK+vZQ+p+E8fvNrdxNU/2wAUMfBLh+gxDg1uS9VM/L3AXTdAVxWkXsM9ZR2oUULA9gJShs5LTzazIRn9P7VGWN07uL2j/fxVk7sBRIET11zc0yfyZH8t88TzqQe2b92wuaUGqQg8JCUnWANo1F4PVJ2/imWiusqFXAUOvHuM8ugwUKA493Iu9v5Hua5GqIuwqbmGYiBWAfFErP1y2eUfK0SLReGHI5coj74H5Hlh9BGEs49mAwIVrIBs1WVj62r1mqPCuaIHdoA7XwLLygFX6DuYwsl/CXRy8eZ9bR8/uXpr4ZXbkrY0lDywbWjc1MX6kQjn3rSAN1h+S8j9UgAnmRxSFGZm51AkeFVQFOhoy3CnOExiUJFSTpP6+DZbvsrUf3Y50/31TOtj392IJN8545DeXzRNMxTw6HB8//dDFU9CvgRNtVAsQv7GFK4yQ5Oup3ZuXGxvjV/XfHdej4ib4weP32Liw99M07Q0uHSo8u3RF3d++lZ63PbAqUI65ZPp7CR0jfR6vWCETohbqUWRtZOnc/VMHM3+tw9UYIHSuHXtVvdTW57pjRbqorAYgEpgJCJegybdhrrIkqZKd/rCdVke+WIaJs9KKR3XdRFSSoQQ64B+mve9nXhtYDMPdpJoNDBCz65TnVI5O1vIn/p9jvGRkzB1DChKKaVlWayOaRmSgeizKDueJhpL4vtL+NV7yPnzMDUG/AHcWZm0ZVn8C2YPaqnkRnyEAAAAAElFTkSuQmCC';
      this.tooltipText=this.label+" current page"; 
    };
    this.makeStop=function(){
    this.label="Stop";
    this.tooltipText=this.label+" loading this page";
    this.isReload=false;
    this.image='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANbY1E9YMgAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAApZJREFUeNp1k01IVFEYhp977tyhcaaZEZvSAhViMmlaFMi4iImEFmHgbgqUVlFQmiHRoqCoIFpEtDSEcKG0sqBFWf5htcgWSVERmSSUjn936o6euc69c+e2sBGN+nbfeXmfw/nO9ypsrChQxv9LBybWHyjrm4Eww+omX1zbVgFu4Y8qEKpgJTVNwTTHDv+i4Z+AgTDDajAUj3U9xJpfwF5eopB3KBgZXCePbSwz++AuBTO7AaIUzVowFK/t7CM9OoJtZEBVV0VFAdcFjwdV85Lq3QgRa+Z7fSw+78cFXMtGEQKEWL3G46Egl3Fsi4rm8whfSXwgzDCAUH0l8drOPhafPUf1+9l9/QrV585gp9MIVcVZyVJz9TI729tQczlc26aipQOhiTiAcLZEyLx5TV6fp7ypEUUoBPfsJtrRxvf73dTevIEWDqFVVzI41A8yg1Bc8n53dQZDleWyKtlCdjaFbRjsunyRQF09CG1t0paUnAoEOAgEgUjNPn4sjdM8g1/o2SwFfQ438wuvV/CkPsG7k20bPr89EOAEUIVCAMh/GYeZVU0syCy5qQncbJpvfY/xe0NE79zCzFlYloVpWVzr7sELbMKlBNjshbk/cPGVPGJhnqWPX8C/lbqpzxi2Q1rX6W08wlLWxGk6yvauLoKAD/B7wCgCpkxwJqcxUjqR65f4CRgZg9s7trN/cBj9eBLdNLEPNfAKKNUgvBcmi+9LwFgS5FOEfARy9MZN2Q7yPchPAjkBcvJYUp4G+Rbk3AFkEmQCxoqbGE1ATxnEziLwUiAIqIAGaAqoLgQj4MSgdQRS8OEFtAATxSxEE9ATgdgFPJT68vi8UBICjwARALsUWl/CzDrz32mMJqCnHGL/y/LsX2aA3xU9DrMOPMF9AAAAAElFTkSuQmCC';
    }
    this.setButton=function(){
      if(gBrowser.getBrowserForTab(gBrowser.selectedTab).webProgress.isLoadingDocument){
        this.makeStop();
      }else{
        this.makeReload();
      }
    }
    this.setAttribute("onmouseover","this.setButton();");
    this.setButton();
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','Jessef');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stop-refresh-button.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

  482. Stopwatch

    Code Tab

    /*Code*/
    const img0 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAAOdJRE" +
      "FUaN7t2tEShCAIhWFP0/u/Mnu/uxY0itj8XFd+Q2hltEYQ3dCDc2y1QwXAYYuKgEMeFQK7" +
      "TSoGdrlel2n7Oiazpu3KJ2dmlbh62J1RgVLQpHJRcOwftA2YuE/DPfax42McNGjQoEGDBg" +
      "0aNGjQoN+F1mSLRqOVlETXOGcR7L8xLYpWgdLN3NkiXGE7uI4N4OadiFZgQoZXj5X42zt9" +
      "Bi+kCvOJFybQoEGDBg0aNGjQoEGDBt0uPlS362HqnVy+W6y3bVC+L89bMlklG0bTa5qV6b" +
      "agpoehs1aP4ehZ8Ar/eIh3xAd5MSx7uAZ5hAAAAABJRU5ErkJggg==";
    const img1 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAAIhJRE" +
      "FUaN7t2kEKgDAMAMFE/P+X9eKploqg0uAseB8lSA1GSJL0k7bj6paTgofGnBzcdWYB8Mm6" +
      "VBx4aGhoaGhoaGhoaGho6Dtl1Sedj97dBF/nWWmEh9smqRmPpRo4ImKthJ0ZffmmWCthnT" +
      "2goaGhoaGhoaGhoaGh2/zD9BK8zLbUplSS9G07lcURXgzmFnkAAAAASUVORK5CYII=";
    const img2 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAAN9JRE" +
      "FUaN7t2lEOhCAMRVHq/vf8XIADUkbgaW4/jcSjqSilpRBENWJgjHY7wgCctoQJOOUJI3C3" +
      "KczAXa7PPukdOa2Wz3H20J0xBi+gSemgnoyI4hPqvbnjjZ9x0KBBgwYNGjRo0KBBgwY9us" +
      "B95sSNJYSL1bnCpH/Qu2t5yqDlmudhDK4ajwo2XMG/DqqRUzbTX9ykxWr80PaFEm/zlg9L" +
      "Bl2ccp1/D9CgQYMGDRo0aNCgQYMG3Vqorl6Rx1MDavUP+15TLQSn4PSaroLTa+qW0yvg03" +
      "a3ZsGd2keJd8cJuSApcQxbcS0AAAAASUVORK5CYII=";
    const img3 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAANBJRE" +
      "FUaN7t2lsOhDAMQ1HC/vfsWcAI6Dtudf0N4oDSoka5LkIeEw33KNsRBuBqS5iAqzxhBC42" +
      "hRm4yHXsl86oab35HHcPfRmj8QGaVA4qqYi4fKLSl7t3/I2DBg0aNGjQoEGDBg0aNOjWA+" +
      "6YCxNbCH9W5w6TetDZvTzVoOVa52EMfjTegxbo0vo+rqYz8G/NyOgpAy3GDkHPCl1T0KBB" +
      "gwYNGjRo0KBBgwbddQrOOpFPn2Hablpsu7k8Zk174cyartrNjp9Unwl3aoSSvfMDjXwpcZ" +
      "OMRfkAAAAASUVORK5CYII=";
    const img4 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAAMJJRE" +
      "FUaN7t2kEKwzAMRNFMyf2vrG66aos9prUsJ38guzh6BkdEkOMghBBCEhOvq1xtNRY5980C" +
      "N2vLWJQJt2rLXJQBt2s/dnzZQIMGDRo0aNCgQYMGDfpa6NmDrf38c/CBMRktp8ZZAPs+jX" +
      "drqrMwC9xyfZhk7HxlNHL4o1CzkNs9VAwco7itzvQKfKsB6JdjEMnYv6Bn9+nuxvhgAg0a" +
      "NGjQoEGDBg0aNGjQFQdbaxKviP4G1y4nYOU/gYQQQu6YJ3phIGRc4XyKAAAAAElFTkSuQm" +
      "CC";
    const img5 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAAOFJRE" +
      "FUaN7t2tEOwyAIheGy7P1fmd6voYVNx9H8XGv6xShtkeMgiDDsizne7TABcNliIuCSx4TA" +
      "aZOJgVOu7VbaP8bI72kPxslmD0+M9Q5sNMFHP2BGvFZ8jYMGDRo0aNCgQYMGDRr0XmhTQb" +
      "+LYMkSQke9o4yP0LNqHEPgmbJYZ1gF7ULJwrLZw8TAXsV17+nLOVO+vogymeTt1mPV1oQO" +
      "XLpiywcTaNCgQYMGDRo0aNCgQYP+9cd2Vg9Tpn9KstfUnxZWtVjjdz56Tf8F33alO/b00J" +
      "S3XKf6TLhSIZRYO071Dih1lhYjwwAAAABJRU5ErkJggg==";
    const img6 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAAOVJRE" +
      "FUaN7t2tEOwyAIhWFZ9v6vzO7X2cKicjQ/1xq/GKUtpTWC6Ib9McerHSYATltMBJzymBA4" +
      "bDIxcMh13E771xj5M+2dcbLZwwNjvQLbm+CjF5gRrx0f46BBgwYNGjRo0KBBgwZ9FtpU0O" +
      "8kWLKEUFHvSON76Fk1jiHwSFmsMiyDdqFkYU/Zw8Uyxc87tcOZvpii2WMV3iKWaAFyNt4y" +
      "BqWqaXhtXphAgwYNGjRo0KBBgwYNGvTdh2plD1NkbcluMX/aWNW+vNvyHL2mq+DH7nQrON" +
      "PD0Kuyx3D0LLjM7z5i+/gAWxIwdJz//kEAAAAASUVORK5CYII=";
    const img7 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAALNJRE" +
      "FUaN7t2kEOgzAMBMC44v9fdu+tKAGVxq5m74ghWgViMYbIbuLCNbnaEQXApy1RBHzKE4XA" +
      "06YoBp5y/e1Kr+h0fvJV3D3yyBgXb5A31SFnGhGjTnL24R4dX+PQ0NDQ0NDQ0NDQ0NDQVw" +
      "+4rVb6q7O8Cqfz6FThHGvmidKqIq326bc+b52wldGHO8XWCevbAxoaGhoaGhoaGhoaGvo1" +
      "1YZ67f5h2oO3mZaalIqIyG/zBGidGWfcmaQBAAAAAElFTkSuQmCC";
    const img8 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAAO1JRE" +
      "FUaN7t2sEOhDAIRdE+4///MrPXjAWtSJvL2spJg1UJrRHE39CNNfa1QwXAYYuKgEMeFQK7" +
      "TSoGdrmW22k7XJNZ03blk3NnlXh6WM+oQCnopXJRMPcJbQMe3Lvhzr3N+BoHDRo0aNCgQY" +
      "MGDRo06LXQetnivv/+8Pd+NFqeHHsB7PFvvJtTnYVZ4CvXyeRpi30Zj9pipeCbozwqgG25" +
      "mjbH4mxsi6Kz8KHOKV1TPphAgwYNGjRo0KBBgwYNemr0EjNMvZ5D2WmxI3yauTxvyWSVbB" +
      "jNrGnWTrcPanoYOuv0GI5+C16liU/MHz+MMjd33S1hcAAAAABJRU5ErkJggg==";
    const img9 = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAC0AAABLCAYAAADktw7dAAAAAXNSR0IArs4c6QAAAPNJRE" +
      "FUaN7t2tEOgCAIheFO6/1f2e5rJYYKtp/rzC9HlMxtI4jH0IcxJdqhBOBmi5KAmzxKBDab" +
      "lAxscv1upcvlmpk5Xd58Mq6sJlaPUjOqIRU0KF3UOPcNXTq8uF/DPPe+4mccNGjQoEGDBg" +
      "0aNGjQoP+F1mCL+f6Hc3vfGy3LHEcC7HU3Xp1TlYGzwG+um8nSFosMV1ssFXwPqhSbpwCs" +
      "0J9uyukI/FsBkCcNymRsF/ToOl19MH6YQIMGDRo0aNCgQYMGDRq0d2Ob6gxTRPvgavl0Wi" +
      "wC/ASXJz04a+qF/3alI3K6a8lb7qT6SHimRiixdpwmPS94vOnmcgAAAABJRU5ErkJggg==";
    const imgClose = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAAAXNSR0IArs4c6QAAAAZQTF" +
      "RFAAAx/wAAU2gS5gAAAAF0Uk5TAEDm2GYAAABgSURBVAjXY2BgbmBgIEAYzwASn+cxMDB+" +
      "ng8UOtzewMDe3HyAgZ258QADH3PDAwghw9xQgEwwMGAQfAwMDyAEOwMj0IAG5gMMzAfYGx" +
      "gYP8gD7fj/D0jY/wAS/A8YwAAAPU0fFM23/K4AAAAASUVORK5CYII=";
    const imgDecimal = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAA8AAABLCAYAAACvH90wAAAAAXNSR0IArs4c6QAAAC1JRE" +
      "FUWMPtzSEOADAIBEHK//9MfR1Bkc64E5uLAAAAgC3Os6vT5ORZvCb+0QU+aQESdaD4FQAA" +
      "AABJRU5ErkJggg==";
    const imgReset = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAALpJRE" +
      "FUWMPlV1sOgCAMo4sH4+jcTH8N4U1XSdynyujaDkcIfw+sLkwp3KXnMc7lpAOYBWOe9I6A" +
      "hGrTGhtQVl8CAbUEOQhXDyyZcMQ4OyDy/KY4bFogrPSCzUJLDgkDQ+fAaNswOyPGgM8ZsJ" +
      "bmHl44zgPWq9KbBZs1Djuut9Nzh8pMqIpSgWe0oUL3Wj70PmR4oZUTswuYm7u34dZQuvtz" +
      "osyEK5cPl6l4pyN6rIGp54pkYJtLdYTT4gFHQ2QmZTGW0wAAAABJRU5ErkJggg==";
    const imgSeparator = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAAA8AAABLCAYAAACvH90wAAAAAXNSR0IArs4c6QAAADFJRE" +
      "FUWMPt1iEOADAIBEHo//9cPK7B0GTGITbYiwAWyXbfl+ZMPou/iQHAJhHbJEBTKMYCIx4/" +
      "++QAAAAASUVORK5CYII=";
    const imgStart = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAJhJRE" +
      "FUWMPN1zsOgCAQBFDGzME8ujfTxkpDgP0NlDTzCAssrW0xrnarovEDnO+cDFAMwXALkiGY" +
      "roEkCJaLMBgC8ykIgsB9DJ0QhN0DRkgcwAiJByxC8gCTkHzAAFIH6EDqAR/Ioe4EqFp5Pa" +
      "BThFQF5wMmLyKqguMBxseIqmA/IKghoSp4HZDUlFIVPAYUfUyoCt7mcyofD8C3IxCzor76" +
      "AAAAAElFTkSuQmCC";
    const imgStop = "data:image/png;base64," +
      "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAADdJRE" +
      "FUWMPt0LERADAIAkDNZBndzUyRIWiehpI/qsLpX7OZ+dsn/QAAAAAAAAAAAAAAAAAAQDwP" +
      "BdYCPHKkuqQAAAAASUVORK5CYII=";
    const imgDigit = new Array(
      img0, img1, img2, img3, img4, img5, img6, img7, img8, img9);
    var startTime;
    var timerID;
    var recordValue = 0;
    var currentValue = 0;
    function start() {
      document.getElementById("startButton").hidden = true;
      document.getElementById("stopButton").hidden = false;
      startTime = new Date().getTime();
      timerID = window.setInterval("count()", 10);
    }
    function stop() {
      document.getElementById("startButton").hidden = false;
      document.getElementById("stopButton").hidden = true;
      window.clearInterval(timerID);
      count();
      recordValue = currentValue;
    }
    function reset() {
      startTime = new Date().getTime();
      recordValue = 0;
      currentValue = 0;
      document.getElementById("hour_10").src = img0;
      document.getElementById("hour_1").src = img0;
      document.getElementById("separator_hour_minute").src = imgSeparator;
      document.getElementById("minute_10").src = img0;
      document.getElementById("minute_1").src = img0;
      document.getElementById("separator_minute_second").src = imgSeparator;
      document.getElementById("second_10").src = img0;
      document.getElementById("second_1").src = img0;
      document.getElementById("separator_decimal").src = imgDecimal;
      document.getElementById("decimal_10").src = img0;
      document.getElementById("decimal_100").src = img0;
    }
    function count() {
      currentValue = new Date().getTime() - startTime + recordValue;
      var hour = Math.floor(currentValue / 3600000);
      var minute = Math.floor(currentValue % 3600000 / 60000);
      var second = Math.floor(currentValue % 3600000 % 60000 / 1000);
      var decimal = Math.floor(currentValue % 3600000 % 60000 % 1000 / 10);
      var hour10 = Math.floor(hour / 10) % 100;
      var hour1 = hour % 10;
      var minute10 = Math.floor(minute / 10);
      var minute1 = minute % 10;
      var second10 = Math.floor(second / 10);
      var second1 = second % 10;
      var decimal10 = Math.floor(decimal / 10);
      var decimal100 = decimal % 10;
      document.getElementById("hour_10").src = imgDigit[hour10];
      document.getElementById("hour_1").src = imgDigit[hour1];
      document.getElementById("minute_10").src = imgDigit[minute10];
      document.getElementById("minute_1").src = imgDigit[minute1];
      document.getElementById("second_10").src = imgDigit[second10];
      document.getElementById("second_1").src = imgDigit[second1];
      document.getElementById("decimal_10").src = imgDigit[decimal10];
      document.getElementById("decimal_100").src = imgDigit[decimal100];
    }
    function load() {
      document.getElementById("startButton").image = imgStart;
      document.getElementById("stopButton").image = imgStop;
      document.getElementById("resetButton").image = imgReset;
      document.getElementById("closeButton").image = imgClose;
      reset();
    }
    function unload() {
      stop();
      reset();
    }

    Initialization Tab

    /*Initialization code*/
    var codeTab = document.getElementById(this.id).getAttribute("cb-oncommand");
    var helpTab = document.getElementById(this.id).getAttribute("Help");
    this.leftclick = function(event) {
      var tag = new Array("<script><!\x5bCDATA\x5b", "\x5d\x5d></script>");
      var xml = helpTab.replace("</window>", tag[0] + codeTab + tag[1] + "</window>");
      var url = "data:application/vnd.mozilla.xul+xml;text/plain," + xml;
      var feature = "chrome,centerscreen,width=696,height=92";
      window.openDialog(url, "", feature);
    }
    this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.2");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stopwatch.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.0.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

    <?xml version="1.0"?>
    <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    <window class="dialog"
            align="center"
            orient="vertical"
            title="Stopwatch"
            onload="load();"
            onunload="unload();"
            xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      <vbox>
        <hbox>
          <vbox>
            <button id="startButton" oncommand="start();" hidden="false" flex="1" />
            <button id="stopButton" oncommand="stop();" hidden="true" flex="1" />
          </vbox>
          <image id="hour_10" />
          <image id="hour_1" />
          <image id="separator_hour_minute" />
          <image id="minute_10" />
          <image id="minute_1" />
          <image id="separator_minute_second" />
          <image id="second_10" />
          <image id="second_1" />
          <image id="separator_decimal" />
          <image id="decimal_10" />
          <image id="decimal_100" />
          <button id="resetButton" oncommand="reset();" flex="1" />
          <button id="closeButton" oncommand="window.close();" flex="1" />
        </hbox>
      </vbox>
    </window>
  483. Strikethrough²

    Code Tab

    /*Code*/
    /*
    	Custom Button authored by m435tr0d, SCClockDr
    	Get more buttons at, http://m435tr0d.trombonehole.net/cb/
    		L = IF text is highlighted:
    			BBCode: [s]Highlighted[/s]
    			HTML: <del>Highlighted</del>
    				OR nothing highlighted,
    			First click = [s] or <del>
    			Second click = [/s] or </del>
    		M = [s]Clipboard[/s] or <del>Clipboard</del>
    			BBCode: [s]Clipboard[/s]
    			HTML: <del>Clipboard</del>
    				 Highlighted text will be replaced
    		R = Context Menu with tag options and submenu for CB Context
    Start Code Statments */
    this.doLeft(event);
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    var End = Cb.isPref("extensions.custombuttons.tagIt.index",0);
    this.info = '\n\nBBCode: [s]Clipboard[/s]\n\nHTML: <del>Clipboard</del>';
    this.ss = [
    	{ label: 'BBCode', open: '[s]', open1: '[s]%h', close: '[/s]', sItemId: '' },
    	{ label: 'HTML'  , open: '<del>', open1: '<del>%h', close: '</del>', sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.amidclick = function(evt)
    {};
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
    	index 		: 0,
    	listo 		: '',
    	liste 		: '',
    	listc		: '',
    	theBox		: {},
    	startPos 	: 0,
    	endPos 		: 0,
    	oPosition 	: 0,
    	oHeight 	: 0,
    	text		: '',
    	nHeight		: 0,
    	Highlight	: '',
    	eBlock		: '',
    	cBoard		: '',
    	n		: '',
    	initMeth	: function( oBtn ){
    				this.index	= Number(Cb.getPrefs("extensions.custombuttons.tagIt.index"));
    				this.listo 	= oBtn.ss[this.index].open;
    				this.liste 	= oBtn.ss[this.index].open1;
    				this.listc	= oBtn.ss[this.index].close;
    				this.theBox	= document.commandDispatcher.focusedElement;
    				if ( this.theBox ) {
    					this.startPos 	= this.theBox.selectionStart;
    					this.endPos 	= this.theBox.selectionEnd;
    					this.oPosition 	= this.theBox.scrollTop;
    					this.oHeight 	= this.theBox.scrollHeight;
    					this.text	= this.theBox.value.substring(0,this.startPos);
    					this.nHeight	= this.theBox.scrollHeight - this.oHeight;
    					this.Highlight	= this.theBox.value.substring(this.startPos, this.endPos);
    					this.eBlock	= this.theBox.value.substring(this.endPos, this.theBox.value.length);
    					this.cBoard	= gClipboard.read();
    					this.n		= '';
    					return true;
    				} // End if ( this.theBox )
    				return false;
    			} // End initMeth
    };
    this.doLeft = function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.Highlight) {	// THEBOX CONTAINS NOTHING HIGHLITED.
    		switch(this.pref){
    		case 1:
    			x.text += x.listc + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=0;
    			this.checked=false;
    			break;
    		case 0:
    			x.text += x.listo;
    			x.text += x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=1;
    			this.checked=true;
    			break;
    		}
    	} else {	// THEBOX CONTAINS SOMETHING HIGHLITED.
    		x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
    		var nLen = x.n.length;
    		x.text += x.n + x.eBlock;
    		x.theBox.value = x.text;
    		x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    		x.theBox.scrollTop = x.oPosition + x.nHeight;
    	}
    }; // End this.doLeft*/
    this.doMid= function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.cBoard) {
    		alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
    		return;
    	}
    	x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
    	var nLen = x.n.length;
    	x.text += x.n;
    	x.theBox.value = x.text + x.eBlock;
    	x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    	x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
    	var prefstring = "extensions.custombuttons.tagIt.index";
    	try {
    		var ssIdx = Cb.getPrefs(prefstring);
    	} catch(ex) {
    		var ssIdx = 0;
    		Cb.setPrefs(prefstring, ssIdx);
    	}
    	var aNodes = this.mObj.getItemsById('Note');
    	for(var i = 0; i < aNodes.length; i++) {
    		aNodes[i].setAttribute("checked",false);
    	}
    	aNodes[ssIdx].setAttribute("checked", true);
    }; // End this.getIndex(aNode)
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
    	var prefstring = "extensions.custombuttons.tagIt.index";
    	Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
    	x.mObj.listener = function(x){x.getIndex();};
    	x.mObj.setSub();
    	var nItem = {}, mItem = {};
    	document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
    	for(var i in x.ss) {
    		nItem = new x.mObj.getItem();
    		nItem.id = 'Note';
    		nItem.label = x.ss[i].label;
    		nItem.value = String(i);
    		nItem.checked = false;
    		// nItem.oncommand = Cb.gMyPrn('erty'+x.id);
    		mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    		this.ss[i].sItemId = mItem.id;
    		mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
    		mItem.setAttribute( 'type','checkbox')
    		mItem.setAttribute( 'checked',false)
    		mItem.setAttribute( 'autocheck',false )
    	} // End for(var i in this.ss)
    	x.mObj.getItem();
    	nItem = x.mObj.getItem();
    	nItem.id = 'Note';
    	this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
    	if (  !Cb.isPref("extensions.custombuttons.tagIt.index") ) {
    		Cb.setPrefs("extensions.custombuttons.tagIt.index",0);
    	} // End if ( !Cb.isPref("extensions.custombuttons.tagIt.index") )
    	var index = Cb.setPrefs("extensions.custombuttons.tagIt.index");
    	this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = gPrefService.getIntPref("extensions.custombuttons.tagIt.index"); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20081211.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [s]Highlighted[/s]
    	 HTML: <del>Highlighted</del>	
    	 OR nothing highlighted
    		 First click = [s] or <del>	
    		 Second click = [/s] or </del>
     M =
    	 BBCode: [s]Clipboard[/s]
    	 HTML: <del>Clipboard</del>	
    		 Any Highlighted text will be REPLACED	
     R = Context Menu with tag options and submenu for CB Context
  484. StumbleUpon

    Code Tab

    /*Code*/
    /* --------------------------------------------------------
         StumbleUpon
         left click Stumbles,
         right click www.stumbleupon.com,
         middle click Toggles StumbleUpon Toolbar,
         shift click Custom Button Menu
       -------------------------------------------------------- */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.button = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
      switch(evt.button) {
        case 0:
    stumble (0);
          break;
        case 1:
          openNewTabWith('http://www.stumbleupon.com');
          break;
        case 2:
    su_toggle_toolbar();
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.button(event);");
    this.setAttribute("context", "");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','snwbdr987, others');
    this.setAttribute('version','20061022');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stumbleupon-button.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

  485. Stylish (for v1.0b1)

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
            toggleSidebar('viewStylishSidebar');
    }
    this.midclick    = function(evt){
    	stylishOverlay.openManage();
    }
    this.rightclick  = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25, rawny');
    this.setAttribute('version','20071012.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish.html');
    this.setAttribute('dependency','Stylish');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    this.tooltipText += ' L: Sidebar | M: Window | R: button context menu';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  486. Stylish (with new images for v1.0b3)

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
            toggleSidebar('viewStylishSidebar');
    }
    this.midclick    = function(evt){
    	stylishOverlay.openManage();
    }
    this.rightclick  = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25, rawny');
    this.setAttribute('version','20090424.03');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish.html');
    this.setAttribute('dependency','Stylish');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    this.tooltipText += ' L: Sidebar | M: Window | R: button context menu';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  487. Stylish (with new images for v1.0b3)

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
            toggleSidebar('viewStylishSidebar');
    }
    this.midclick    = function(evt){
    	stylishOverlay.openManage();
    }
    this.rightclick  = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25, rawny');
    this.setAttribute('version','20090424.03');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish.html');
    this.setAttribute('dependency','Stylish');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    this.tooltipText += ' L: Sidebar | M: Window | R: button context menu';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  488. Stylish (with new images for v1.0b3)

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
            toggleSidebar('viewStylishSidebar');
    }
    this.midclick    = function(evt){
    	stylishOverlay.openManage();
    }
    this.rightclick  = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25, rawny');
    this.setAttribute('version','20090424.03');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish.html');
    this.setAttribute('dependency','Stylish');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    this.tooltipText += ' L: Sidebar | M: Window | R: button context menu';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  489. Stylish Disable/Enable All

    Code Tab

    /*
        Thanks to Jason Barnabe (np) (a.k.a. the developer of Stylish) for supplying some turning styles on/off demo code.
        This button is partly based on that code.
        Rawny ^^
    */

    Initialization Tab

    // ***** IMAGES ***** //
    var enable_all_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAD3MOMXUxYm9RD7EIMM4tUbQdXY9TWK9ObpFvabNvVs4PYs4xZ+svcM5vYehPp6t0kdw0k85SltFzlfFPn/Jri4qKmZiXqKirt7i4l9eOmOyRr+2wsOnN+vSR9fKy6e/U+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1F/DJAAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACQSURBVChTfY/REoIgEEUJSqQVFRFhhcr+/yNphXFyeoi3e2a5e5bln8f+Alwwnyf8uCrcAeL+D/19e0dJIEhFBMc+PVLLGeVoJaKaUlyby8KyvPV2aNXk7ADcU6m4AnRaG1MygSAaANDGGR6om0pRdfPsnlbsuXgQeW1WllzFaAUtqkdUU1RHPtSr7HfidPIHfbmV9ZFCPuwAAAAASUVORK5CYII=";
    var disable_all_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAozARpjAtnHVw3RcU3TUz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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACISURBVChTXY/bDsMgDENbCoSkXEr6/9+6OaGbtPGA5AN24u31dzboORbUiQtgMqvrROcFMPluRjSx0AQY3O7Karqkbhbl2iSlIiV0zwCRKng37QB2Efz3YQ9gLhS+QM1PRB+L632nmKOHrnljhJyNYDFa+T2C2GLXGcnmGTlsdZRxDfKU++3/Bmzyeh3gYUcUAAAAAElFTkSuQmCC";
    var restore_enabled_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAACBCIGjKRFTSvG1OtFUjLFVfSJWnNLXfRKHL0VD6UUFiMVFesUmuwa3KPZniwUnXNW4nRUYjxXZnxZ6fza7f1b8r4kZSvqKirt7i4nKnLlbXtocnyptf20dfs5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv5+ERgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACxSURBVChTHY7bGsIgDINr5zYRd7AtmwwQ3v8lsfW/yJfmIg105bMi3tCf5qH3uOJEKfGEPloQ/ZBqLUoYn1GDdci15D9p9B0+mGrO31aTwnjCOpacSmtZjMnDk7LYzSLM4hCQObfWqiHsBkAiC/6I0+BF5DQJxGqcu8M2q9MSVSJ2C1x3LePSiirLdELfHkH/ZZPwXmz68j6OoBwHLTa9R60JOlweelvQ+7Xt875vl/kfQfMxZmVErfAAAAAASUVORK5CYII=";
    var restore_disabled_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmEgHOgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACNSURBVChTHY8LDsBABEStYjp273/dduwkgkd87JMqfK0VNbHJYnkBFevBALhz90gRBMJ7N/slX7p/hoUm+2wArFWmhskPBYDnMa8XqlNjpXQB8Jx9hbqgBM4eQw7IzBlZkkK3DHmRyYTC4FPs09NSXvZl6Gy8wloSc3ok7hGkavOcuFaTFcrvt4OkvO//Ac4mtY15/xQAAAAASUVORK5CYII=";
    var cb_img = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnsK8UpK2sy6Cqqr6msLEaAAAAAAAAAAAAAAAAwbS3DtDGxs6jmZnajYeEvI+LhxcAAAAAAAAAAAAAAAAAAAAAqLGxBa+5ucymsbPwtsDCxcvQ1aDV1twUuauxFK+fpayklZn3jH+A/YuBf9OOh4QaAAAAAAAAAAAAAAAAAAAAAAAAAADX4OK7u8bI+rC5vPvJzdLx3NnesdbM0rO/r7XXlIGH/Yh3evuvo6Ljt6yqGAAAAAAAAAAAAAAAAAAAAAAAAAAA6/DysLTAxP+4wMX7y87T8e3r8Ozt5urt1MbM9rWhqPeeiI7p1MHDh9bGxwcAAAAAAAAAAAAAAAAAAAAAz9reBdvk6L2qtrz/tr3E/NHU2fno5+v37OXp99zO1Pi/q7L2pIuT6su2vGHIsLYCAAAAAAAAAAAAAAAAjJmfAaGvtCGptbuzmaWt+7S7w/vX2t/86Ofr++7o7Pzg0tj8vqiw+5B0ff6pj5Xamn+FKpBzegIAAAAAkpufAoqVmyWJlpyokp+m146aof+3vsX71Njd/eno7P3v5+z93s/W/begqP17XGb9clVd9H1iaL19ZmsyemhsApCZnSSIkpbHg4+VyYuXnumLmJ//qa63/tTX3f7z8vb+9O3x/eTV3P22nab9dlZg/l1BSPtgSE3ocl9ivoJwcyaWn6O9fIWKz4aRlqaTnqTEmaat/7K4wf/W2eD+8e/0/fDp7vrj09r4uqGr8oFkbfxpT1XmUTtAw2VSVsCSgYTDAAAAAAAAAAAAAAAAq7S6U7/IztG2vcT+2Nrg8+rn7fzp3+b43s3V6ragqdWxmKCqkXh/LQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1NvigdHS2fDl3uf+3tDa/s+8xuzRu8RsAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjc4wvX193A5uLo/d/U2v7Wyc/Z1sbMEAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OPp2eDc4fLVy9H75dnfmwAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** VARS ***** //
    var service = Components.classes["@userstyles.org/style;1"].getService(Components.interfaces.stylishStyle);
    var button = this;
    var num = custombuttons.getNumber(this.id);
    var snap_name = "SDEA"+num+"_snapshot";
    // ***** FUNCTIONS ***** //
    this.disable_all_styles = function() {
      if (button.firstChild.firstChild.nextSibling.disabled) {
        button.firstChild.firstChild.nextSibling.disabled = false;
        button.firstChild.firstChild.nextSibling.image = restore_enabled_img;
        service.findEnabled(false, service.REGISTER_STYLE_ON_CHANGE, {}).forEach(function(style) {
          style.addMeta(snap_name, "false");
          style.save();
        });
      }
      service.findEnabled(true, service.REGISTER_STYLE_ON_CHANGE, {}).forEach(function(style) {
        if (button.firstChild.firstChild.nextSibling.disabled)
          style.addMeta(snap_name, "true");
        style.enabled = false;
        style.save();
      });
    };
    this.restore_snapshot = function(name) {
      button.firstChild.firstChild.nextSibling.disabled = true;
      button.firstChild.firstChild.nextSibling.image = restore_disabled_img;
      service.findByMeta(name, "true", service.REGISTER_STYLE_ON_CHANGE, {}).forEach(function(style) {
        style.enabled = true;
        style.removeAllMeta(name);
        style.save();
      });
      service.findByMeta(name, "false", service.REGISTER_STYLE_ON_CHANGE, {}).forEach(function(style) {
        style.enabled = false;
        style.removeAllMeta(name);
        style.save();
      });
    };
    this.enable_all_styles = function() {
      if (button.firstChild.firstChild.nextSibling.disabled) {
        button.firstChild.firstChild.nextSibling.disabled = false;
        button.firstChild.firstChild.nextSibling.image = restore_enabled_img;
        service.findEnabled(true, service.REGISTER_STYLE_ON_CHANGE, {}).forEach(function(style) {
          style.addMeta(snap_name, "true");
          style.save();
        });
      }
      service.findEnabled(false, service.REGISTER_STYLE_ON_CHANGE, {}).forEach(function(style) {
        if (button.firstChild.firstChild.nextSibling.disabled)
          style.addMeta(snap_name, "false");
        style.enabled = true;
        style.save();
      });
    };
    // ***** INITIALISATION ***** //
    var mPopup = document.createElement("menupopup");
    var mItem = document.createElement("menuitem");
    mItem.setAttribute("label", "Disable all styles");
    mItem.setAttribute("image", disable_all_img);
    mItem.func = this.disable_all_styles.bind(this);
    mItem.setAttribute("oncommand", "this.func();");
    mPopup.appendChild(mItem);
    var mItem = document.createElement("menuitem");
    mItem.setAttribute("label", "Restore style states");
    mItem.setAttribute("image", restore_disabled_img);
    mItem.func = this.restore_snapshot.bind(this);
    mItem.setAttribute("oncommand", "this.func('"+snap_name+"');");
    mItem.setAttribute("disabled", true);
    mPopup.appendChild(mItem);
    var mItem = document.createElement("menuitem");
    mItem.setAttribute("label", "Enable all styles");
    mItem.setAttribute("image", enable_all_img);
    mItem.func = this.enable_all_styles.bind(this);
    mItem.setAttribute("oncommand", "this.func();");
    mPopup.appendChild(mItem);
    mPopup.appendChild(document.createElement("menuseparator"));
    var cbPopup = document.getElementById("custombuttons-contextpopup").cloneNode(true);
    var cbItems = cbPopup.childNodes.length;
    var subPopup = document.createElement("menupopup");
    for(var i = 0; i < cbItems; i++) {
      subPopup.appendChild(cbPopup.firstChild);
    }
    var subMenu = document.createElement("menu");
    subMenu.setAttribute("label", "Custom Button");
    subMenu.setAttribute("image", cb_img);
    subMenu.appendChild(subPopup);
    mPopup.appendChild(subMenu);
    this.appendChild(mPopup);
    this.type = "menu";
    this.setAttribute("class", "menu-iconic");
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','rawny');
    this.setAttribute('version','4 (2009-05-09)');
    this.setAttribute('dependency','FF3.0*, CB2 3.0.*');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish-disableenable-all.html');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Left clicking this button will show it's menu, from the menu you can:
    - Enable all styles
    - Disable all styles
    - Restore style states
    Clicking Enable/Disable all styles, will take a snapshot of the current enabled/disabled states of your styles and then Enable/Disable all your styles.
    Clicking Restore style states will restore the first snapshot taken (and remove that snapshot).
    This means you can select "Enable all styles", do whatever you like (including clicking "Disable all styles" or clicking "Enable all syles" again) and then click "Restore style states", to restore the enabled/disabled states of your styles to how they were before you first clicked "Enable all styles".
  490. Stylish Quick Edit

    Code Tab

    /*
      This button is designed to save some clicks, at the request of Barbiegirl.
      L: New blank style
      M: New style for the current domain root (e.g. "custombuttons2.com", "userstyles.org")
      R: New style for the current URL
      Rawny ^^
    */

    Initialization Tab

    function GetRoot()
    {
      var domains = [];
      stylishOverlay.getDomainList(content.document.domain, domains);
      var domain = domains[domains.length-1];
      stylishOverlay.STRINGS.getFormattedString("writefordomain", [domain]);
      return domain;
    }
    this.leftclick = function(evt)
    {
      stylishOverlay.addCode('');
    };
    this.midclick = function(evt)
    {
      if (content.document.domain) {
        stylishOverlay.addDomain(GetRoot());
      }
    };
    this.rightclick = function(evt)
    {
      stylishOverlay.addSite();
    };
    this.Reload = function()
    {
      this.tooltipText = "L: New blank style"+"\n"+"M: New style for "+GetRoot()+"\n"+"R: New style for this URL";
    }
    this.setAttribute('onclick', 'custombuttons.gQuot.mHandler(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'custombuttons.gQuot.mHandler(event, this)');
    this.setAttribute("onmouseover", "this.Reload();");
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','rawny');
    this.setAttribute('version','1 (2009-05-07)');
    this.setAttribute('dependency','FF3.0*, CB2 3.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish-quick-edit.html');

    Help Tab

    This button opens the Stylish editor for writing...
    Left click: ...a new blank style.
    Middle click: ...a new style for the current domain root (e.g. "custombuttons2.com", "userstyles.org").
    Right click: ...a new style for the current URL.
  491. Stylish Style List Toggle

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    //toggle a style on left click
    var styleToToggle = 46;
    //list of styles for right click menu
    this.styleList = [
    435, //some style
    2, //some other style
    46, //and another style
    102 //MISSING STYLE
    ];
    //"Edit" to edit the style or "Toggle" to toggle it
    var toggleOrEditStyle = "Toggle";
    this.listStyles = function(button,shift,self){
        if (shift == true){//context menu
            document.getElementById("custombuttons-contextpopup").openPopup(self,"after_pointer");
            return;
        }
        var service = Components.classes["@userstyles.org/style;1"].getService(Components.interfaces.stylishStyle);
        if (button == 0){//left click
            var style = service.find(styleToToggle,service.REGISTER_STYLE_ON_CHANGE);
            if (style.enabled == 0){
                style.enabled = 1;
            } else {
                style.enabled = 0;
            }
            style.save();
            return;
        }
        var XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
        var styles = this.styleList;
        //remove old popup
        var popup = document.getElementById("nsChoGGi_StylishListStylesPopup");
        if (popup){
            popup.parentNode.removeChild(popup);
        }
        //make a new popup
        popup = document.createElementNS(XULNS,"popup");
        popup.setAttribute("id","nsChoGGi_StylishListStylesPopup");
        for (var i = 0; i < styles.length; i++){
            var style = service.find(styles[i],service.REGISTER_STYLE_ON_CHANGE);
            if (!style){
                continue;
            }
            var menuitem = document.createElementNS(XULNS,"menuitem");
            menuitem.setAttribute("label",style.name);
            menuitem.setAttribute("type","checkbox");
            if (style.enabled == 0){
                menuitem.setAttribute("checked",false);
            } else {
                menuitem.setAttribute("checked",true);
            }
            //are we toggling or editing?
            if (toggleOrEditStyle == "Toggle"){
                menuitem.setAttribute("oncommand","event.preventDefault();var service = Components.classes['@userstyles.org/style;1'].getService(Components.interfaces.stylishStyle);stylishOverlay.toggleStyle(service.find(" + styles[i] + ",service.REGISTER_STYLE_ON_CHANGE));");
            } else if (toggleOrEditStyle == "Edit"){
                menuitem.setAttribute("oncommand","event.preventDefault();stylishCommon.openEditForId(" + styles[i] + ");");
            }
            //add style to the popup
            popup.appendChild(menuitem);
        }
        document.getElementById("mainPopupSet").appendChild(popup);
        //open it
        document.getElementById("nsChoGGi_StylishListStylesPopup").openPopup(self,"after_pointer");
    }
    this.setAttribute("onclick","this.listStyles(event.button,event.shiftKey,this)");
    this.setAttribute("context","");
    this.setAttribute("author","ChoGGi");
    this.setAttribute("contact","ChoGGi@gmail.com");
    this.setAttribute("version","0.2");
    this.tooltipText += "\nL: Toggle a style\nR: Show List\nShift+R: Options";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish-style-list-toggle.html');

    Help Tab

  492. Stylish Style List Toggle

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    //toggle a style on left click
    var styleToToggle = 46;
    //list of styles for right click menu
    this.styleList = [
    435, //some style
    2, //some other style
    46, //and another style
    102 //MISSING STYLE
    ];
    //"Edit" to edit the style or "Toggle" to toggle it
    var toggleOrEditStyle = "Toggle";
    this.listStyles = function(button,shift,self){
        if (shift == true){//context menu
            document.getElementById("custombuttons-contextpopup").openPopup(self,"after_pointer");
            return;
        }
        var service = Components.classes["@userstyles.org/style;1"].getService(Components.interfaces.stylishStyle);
        if (button == 0){//left click
            var style = service.find(styleToToggle,service.REGISTER_STYLE_ON_CHANGE);
            if (style.enabled == 0){
                style.enabled = 1;
            } else {
                style.enabled = 0;
            }
            style.save();
            return;
        }
        var XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
        var styles = this.styleList;
        //remove old popup
        var popup = document.getElementById("nsChoGGi_StylishListStylesPopup");
        if (popup){
            popup.parentNode.removeChild(popup);
        }
        //make a new popup
        popup = document.createElementNS(XULNS,"popup");
        popup.setAttribute("id","nsChoGGi_StylishListStylesPopup");
        for (var i = 0; i < styles.length; i++){
            var style = service.find(styles[i],service.REGISTER_STYLE_ON_CHANGE);
            if (!style){
                continue;
            }
            var menuitem = document.createElementNS(XULNS,"menuitem");
            menuitem.setAttribute("label",style.name);
            menuitem.setAttribute("type","checkbox");
            if (style.enabled == 0){
                menuitem.setAttribute("checked",false);
            } else {
                menuitem.setAttribute("checked",true);
            }
            //are we toggling or editing?
            if (toggleOrEditStyle == "Toggle"){
                menuitem.setAttribute("oncommand","event.preventDefault();var service = Components.classes['@userstyles.org/style;1'].getService(Components.interfaces.stylishStyle);stylishOverlay.toggleStyle(service.find(" + styles[i] + ",service.REGISTER_STYLE_ON_CHANGE));");
            } else if (toggleOrEditStyle == "Edit"){
                menuitem.setAttribute("oncommand","event.preventDefault();stylishCommon.openEditForId(" + styles[i] + ");");
            }
            //add style to the popup
            popup.appendChild(menuitem);
        }
        document.getElementById("mainPopupSet").appendChild(popup);
        //open it
        document.getElementById("nsChoGGi_StylishListStylesPopup").openPopup(self,"after_pointer");
    }
    this.setAttribute("onclick","this.listStyles(event.button,event.shiftKey,this)");
    this.setAttribute("context","");
    this.setAttribute("author","ChoGGi");
    this.setAttribute("contact","ChoGGi@gmail.com");
    this.setAttribute("version","0.2");
    this.tooltipText += "\nL: Toggle a style\nR: Show List\nShift+R: Options";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish-style-list-toggle.html');

    Help Tab

  493. Stylish-sb

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	stylishBrowserOverlay.openSidebar();
    }
    this.midclick    = function(evt){
    	goDoCommand(stylishCommonOverlay.openManageStyles());
    }
    this.rightclick  = function(evt){
    	gShowPopup(this);		// Replace with call of your choice
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20071012.03sb');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/stylish.html');
    this.setAttribute('dependency','Stylish');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText += ' L: Sidebar | M: Window | R: button context menu';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    /*Help*/
    Left-click: Open Stylish Stylish
    Middle-click: Open Stylish Window
    Right-click: Context Menu
    
  494. Sub with Bloglines

    Code Tab

    loadURI("javascript:location.href='http://www.bloglines.com/sub/'+location.href");

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080604.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bloglines-subscribe-beta.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

  495. Subscribe...

    Code Tab

     

    Initialization Tab

     this.quot = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
    var link="javascript:var%20b=document.body;if(b){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}";
    var label="PortableApps.com | Your Digital Life, Anywhere™";
    var head =(document.getElementById('sidebar-title').getAttribute('value') == label); 
      switch(evt.button) {
    case 0:
    loadURI(link);
    break;
    case 1:
    gBrowser.addTab(link);
    break;
    case 2:
    this.showPopup(this);
    break;
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
     document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-reader-subscribe-button-aranittara.html');

    Help Tab

  496. Subscript²

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    this.info = '\n\nBBCode: [sub]Clipboard[/sub]\n\nHTML: <sub>Clipboard</sub>';
    this.ss = [
    	{ label: 'BBCode'  , open: '[sub]', open1: '[sub]%h', close: '[/sub]', sItemId: '' },
    	{ label: 'HTML'    , open: '<sub>', open1: '<sub>%h', close: '</sub>', sItemId: '' },
            { label: 'WIKI N/A', open: ''     , open1: ''       , close: ''      , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
    	index 		: 0,
    	listo 		: '',
    	liste 		: '',
    	listc		: '',
    	theBox		: {},
    	startPos 	: 0,
    	endPos 		: 0,
    	oPosition 	: 0,
    	oHeight 	: 0,
    	text		: '',
    	nHeight		: 0,
    	Highlight	: '',
    	eBlock		: '',
    	cBoard		: '',
    	n		: '',
    	initMeth	: function( oBtn ){
    				this.index	= Number(Cb.getPrefs( prefstring ));
    				this.listo 	= oBtn.ss[this.index].open;
    				this.liste 	= oBtn.ss[this.index].open1;
    				this.listc	= oBtn.ss[this.index].close;
    				this.theBox	= document.commandDispatcher.focusedElement;
    				if ( this.theBox ) {
    					this.startPos 	= this.theBox.selectionStart;
    					this.endPos 	= this.theBox.selectionEnd;
    					this.oPosition 	= this.theBox.scrollTop;
    					this.oHeight 	= this.theBox.scrollHeight;
    					this.text	= this.theBox.value.substring(0,this.startPos);
    					this.nHeight	= this.theBox.scrollHeight - this.oHeight;
    					this.Highlight	= this.theBox.value.substring(this.startPos, this.endPos);
    					this.eBlock	= this.theBox.value.substring(this.endPos, this.theBox.value.length);
    					this.cBoard	= gClipboard.read();
    					this.n		= '';
    					return true;
    				} // End if ( this.theBox )
    				return false;
    			} // End initMeth
    };
    this.doLeft = function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.Highlight) {	// THEBOX CONTAINS NOTHING HIGHLITED.
    		switch(this.pref){
    		case 1:
    			x.text += x.listc + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=0;
    			this.checked=false;
    			break;
    		case 0:
    			x.text += x.listo;
    			x.text += x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=1;
    			this.checked=true;
    			break;
    		}
    	} else {	// THEBOX CONTAINS SOMETHING HIGHLITED.
    		x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
    		var nLen = x.n.length;
    		x.text += x.n + x.eBlock;
    		x.theBox.value = x.text;
    		x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    		x.theBox.scrollTop = x.oPosition + x.nHeight;
    	}
    }; // End this.doLeft*/
    this.doMid= function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.cBoard) {
    		alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
    		return;
    	}
    	x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
    	var nLen = x.n.length;
    	x.text += x.n;
    	x.theBox.value = x.text + x.eBlock;
    	x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    	x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
    	let ssIdx = Cb.getPref( prefstring ,0);
    	let aNodes = this.mObj.getItemsById( 'Note' );
    	for( let i = 0; i < aNodes.length; i++ ) {
    		aNodes[i].setAttribute( "checked", false );
    	}
    	aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
    	Cb.setPref(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
    	x.mObj.listener = function(x){x.getIndex();};
    	x.mObj.setSub();
    	var nItem = {}, mItem = {};
    	document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
    	for(var i in x.ss) {
    		nItem = new x.mObj.getItem();
    		nItem.id = 'Note';
    		nItem.label = x.ss[i].label;
    		nItem.value = String(i);
    		nItem.checked = false;
    		// nItem.oncommand = Cb.gMyPrn('erty'+x.id);
    		mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    		this.ss[i].sItemId = mItem.id;
    		mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
    		mItem.setAttribute( 'type','checkbox')
    		mItem.setAttribute( 'checked',false)
    		mItem.setAttribute( 'autocheck',false )
    	} // End for(var i in this.ss)
    	x.mObj.getItem();
    	nItem = x.mObj.getItem();
    	nItem.id = 'Note';
    	this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
    	this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPref("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
      The word tag is substituted for sub to facilitate
    posting in the Custom Buttons² forum.
     L = IF text is highlighted:
    	 BBCode: [tag]Highlighted[/tag]
    	 HTML: <tag>Highlighted</tag>	
    	 OR nothing highlighted
    		 First click = [tag] or <tag>	
    		 Second click = [/tag] or </tag>
     M =
    	 BBCode: [tag]Clipboard[/tag]
    	 HTML: <tag>Clipboard</tag>	
    		 Any Highlighted text will be REPLACED	
     R = Context Menu with tag options and submenu for CB Context
  497. Sunbird

    Code Tab

    /*Code*/

    Initialization Tab

    var label='Sunbird';
    var path='C:/Program Files/Mozilla Sunbird/Sunbird.exe';
    //var path='c:/windows/explorer.exe';
    var args='';
      this.label=label;
      this.setAttribute('oncommand','this.startProcess("'+path+'","'+args+'")');
      this.image=img;
      this.tooltipText = label;
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
    // file.launch();
     process.init(file);
     process.run(false,[args],1); 
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/sunbird.html');

    Help Tab

  498. Superscript²

    Code Tab

    /*Code*/
    /*
    	Custom Button authored by m435tr0d, SCClockDr
    	Get more buttons at, http://m435tr0d.trombonehole.net/cb/
    		L = IF text is highlighted:
    			BBCode: [sup]Highlighted[/sup]
    			HTML: <sup>]Highlighted</sup>
    				OR nothing highlighted,
    			First click = [sup] or <sup>
    			Second click = [/sup] or </sup>
    		M = [sup]Clipboard[/sup] or <sup>Clipboard</sup>
    			BBCode: [sup]Clipboard[/sup]
    			HTML: <sup>]Clipboard</sup>
    				 Highlighted text will be replaced
    		R = Context Menu with tag options and submenu for CB Context
    Start Code Statments */
    this.doLeft(event);
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    var End = Cb.isPref("extensions.custombuttons.tagIt.index",0);
    this.info = '\n\nBBCode: [sup]Clipboard[/sup]\n\nHTML: <sup>]Clipboard</sup>';
    this.ss = [
    	{ label: 'BBCode', open: '[sup]', open1: '[sup]%h', close: '[/sup]', sItemId: '' },
    	{ label: 'HTML'  , open: '<sup>', open1: '<sup>%h', close: '</sup>', sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.amidclick = function(evt)
    {};
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
    	index 		: 0,
    	listo 		: '',
    	liste 		: '',
    	listc		: '',
    	theBox		: {},
    	startPos 	: 0,
    	endPos 		: 0,
    	oPosition 	: 0,
    	oHeight 	: 0,
    	text		: '',
    	nHeight		: 0,
    	Highlight	: '',
    	eBlock		: '',
    	cBoard		: '',
    	n		: '',
    	initMeth	: function( oBtn ){
    				this.index	= Number(Cb.getPrefs("extensions.custombuttons.tagIt.index"));
    				this.listo 	= oBtn.ss[this.index].open;
    				this.liste 	= oBtn.ss[this.index].open1;
    				this.listc	= oBtn.ss[this.index].close;
    				this.theBox	= document.commandDispatcher.focusedElement;
    				if ( this.theBox ) {
    					this.startPos 	= this.theBox.selectionStart;
    					this.endPos 	= this.theBox.selectionEnd;
    					this.oPosition 	= this.theBox.scrollTop;
    					this.oHeight 	= this.theBox.scrollHeight;
    					this.text	= this.theBox.value.substring(0,this.startPos);
    					this.nHeight	= this.theBox.scrollHeight - this.oHeight;
    					this.Highlight	= this.theBox.value.substring(this.startPos, this.endPos);
    					this.eBlock	= this.theBox.value.substring(this.endPos, this.theBox.value.length);
    					this.cBoard	= gClipboard.read();
    					this.n		= '';
    					return true;
    				} // End if ( this.theBox )
    				return false;
    			} // End initMeth
    };
    this.doLeft = function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.Highlight) {	// THEBOX CONTAINS NOTHING HIGHLITED.
    		switch(this.pref){
    		case 1:
    			x.text += x.listc + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=0;
    			this.checked=false;
    			break;
    		case 0:
    			x.text += x.listo;
    			x.text += x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=1;
    			this.checked=true;
    			break;
    		}
    	} else {	// THEBOX CONTAINS SOMETHING HIGHLITED.
    		x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
    		var nLen = x.n.length;
    		x.text += x.n + x.eBlock;
    		x.theBox.value = x.text;
    		x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    		x.theBox.scrollTop = x.oPosition + x.nHeight;
    	}
    }; // End this.doLeft*/
    this.doMid= function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.cBoard) {
    		alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
    		return;
    	}
    	x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
    	var nLen = x.n.length;
    	x.text += x.n;
    	x.theBox.value = x.text + x.eBlock;
    	x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    	x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
    	var prefstring = "extensions.custombuttons.tagIt.index";
    	try {
    		var ssIdx = Cb.getPrefs(prefstring);
    	} catch(ex) {
    		var ssIdx = 0;
    		Cb.setPrefs(prefstring, ssIdx);
    	}
    	var aNodes = this.mObj.getItemsById('Note');
    	for(var i = 0; i < aNodes.length; i++) {
    		aNodes[i].setAttribute("checked",false);
    	}
    	aNodes[ssIdx].setAttribute("checked", true);
    }; // End this.getIndex(aNode)
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
    	var prefstring = "extensions.custombuttons.tagIt.index";
    	Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
    	x.mObj.listener = function(x){x.getIndex();};
    	x.mObj.setSub();
    	var nItem = {}, mItem = {};
    	document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
    	for(var i in x.ss) {
    		nItem = new x.mObj.getItem();
    		nItem.id = 'Note';
    		nItem.label = x.ss[i].label;
    		nItem.value = String(i);
    		nItem.checked = false;
    		// nItem.oncommand = Cb.gMyPrn('erty'+x.id);
    		mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    		this.ss[i].sItemId = mItem.id;
    		mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
    		mItem.setAttribute( 'type','checkbox')
    		mItem.setAttribute( 'checked',false)
    		mItem.setAttribute( 'autocheck',false )
    	} // End for(var i in this.ss)
    	x.mObj.getItem();
    	nItem = x.mObj.getItem();
    	nItem.id = 'Note';
    	this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
    	if (  !Cb.isPref("extensions.custombuttons.tagIt.index") ) {
    		Cb.setPrefs("extensions.custombuttons.tagIt.index",0);
    	} // End if ( !Cb.isPref("extensions.custombuttons.tagIt.index") )
    	var index = Cb.setPrefs("extensions.custombuttons.tagIt.index");
    	this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = gPrefService.getIntPref("extensions.custombuttons.tagIt.index"); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20081211.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [sup]Highlighted[/sup]
    	 HTML: <sup>Highlighted</sup>	
    	 OR nothing highlighted
    		 First click = [sup] or <sup>]	
    		 Second click = [/sup] or </sup>
     M =
    	 BBCode: [sup]Clipboard[/sup]
    	 HTML: <sup>Clipboard</sup>	
    		 Any Highlighted text will be REPLACED	
     R = Context Menu with tag options and submenu for CB Context
  499. Switch Tab Bar Position

    Code Tab

    var tabBox = gBrowser.mTabBox;
    if(tabBox.dir == "ltr") {
      tabBox.dir = "rtl";
      this.image = this.imgTabDown;
    } else {
      tabBox.dir = "ltr";
      this.image = this.imgTabUp;
    }
    gPrefService.setCharPref("browser.tabs.tabBarPosition", tabBox.dir);
    

    Initialization Tab

    this.imgTabUp ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAEG0lEQVR4AQEQBO/7Af///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVmyEyDQsJTUFAwMCAAAAAAAAAAAAAAAAAAAAAAAAAADv9PX8zdPbhrSdg38AAAAAAAAAAAAAAAAAAAAAAAAAAACToLP99fj3/+nu7//m6+r/+ffq//j26P/39eb/9vTl//X27P9meI/ERFV3D////wD///8A////AP///wD///8ABA0NCwLz9fsA6/MBAOHn9gBFLwUAytTdAPv6+QAIBwUAMyspAAsJBiscFPmnZmxy+gAAAAD+AP4A+Pj67/Py+YgEAgMDAP/9/wD9/wMAAQIIAAIDAQAMCwsABQ0JAAgGBgABAQIAHR0ZEGxdRUkNCgcA//8AAAECAADZ3OL/foKL3QT9+/wAAf/4AOzh6wD++foA+vgMACIXCAD+/v0A/f39APn48QD49fQA7ezoAPgJBgD+/v4AAAD+ABIQCwEQFBMKBP///wAWFAgAQToQAP38/AD7+/oAAQAAAAAAAAAAAAAAAAEAAPf3+gDd4uoACAcEAP///wD//v0AAgQJAPb6+wEE////AAECAwABAQcAAQIDAAABAQAAAQEAAf38AAECAgACAgQASkIxAO/y8QAAAAAAAAAAAAAAAADw8fYA8fICAATx8u4A3eDdAAAA/gAA//8A/v39AP3+/QD//v4A/v7+AAAA8QANCgEADQkHAAAAAAAAAAAAAAAAAAsG+wAGAvwABAsIBgAdGyUAAAAAAAD//wAAAP8A////AP//AAAAAP8A////AAAAAAAA//8AAAAAAAAAAAAAAAAACQruAP4AAAAEAgIAAAYFAAAAAP8AAP//AP7+/QD9/f0A/wD/AP7+/gAA//8A//7+AAAA/wAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABP7+AAD6+wAAAAABAAD/AAAAAAMA//8CAP//AAAAAf8AAAD/AAEDAAAA//8AAAAAAAAAAAAAAAAAAQL3AAAAAAAE9fj6AOPl2wAAAP4AAP//AP79/QD9/v0A//7+AP7+/gAAAAEAAAEBAAD//wAAAAAAAAAAAAAAAADt7/QAAgAAAAQPDhIAIyAjAAD/9wD//vwA/Pv6APv7+gD9/fwA/f39AAUGDADT2u0A7/LxAAAAAAAAAAAAAAAAAPDx+wD6/gQABAEBAQD//v0A//35AP38/AD7+/oA/Pv7AP3+/QD9/f0AAwT8ALa+zwAqIhAACAcEAP///wD//v0ACQUJAA8O/gAEAQEBAOrs+ADU1/AA9/n6AEI4DAD/AAAAAAAAAAAAAAAA/wAACQkGACMeFgALCQYA/v7+AAAA/gACBAoACgYF/wQDBQQA/wEIABQfHwDl6vUABggBANnk5AAFAv4ACAYGAB4QDwAICwwAExQYAA0KBwD//wAAAQIAANnc4v/w7O32BP79/QABAwEAAwH9AP/++AD+/QUA9PX1APv6+QAIBwUAHRkYAOPj5/CDi8LHBQIB+gAAAAD+AP4A+Pj67w0OFKsE8/P1/g0LBQIBAfgAEwsKAAABAAA2LCYA///+AP///wD9AAMA9ff61eTsB1m7qojxAAAAAAAAAAAAAAAAAAAAAATDzNHL9/j2NQUDAwIAAAAAAAAAAAAAAAAAAAAAAAAAAO/09fzl6u29u6qI8QAAAAAAAAAAAAAAAAAAAAAAAAAAAf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAesA+I7COehwAAAABJRU5ErkJggg==";
    var tabBoxDir;
    try {
      tabBoxDir = gPrefService.getCharPref("browser.tabs.tabBarPosition");
    } catch(ex) {
      tabBoxDir = gPrefService.setCharPref("browser.tabs.tabBarPosition", "ltr");
    }
    //initiate at browser startup
    gBrowser.mTabBox.dir = tabBoxDir;
    this.image = tabBoxDir == "ltr" ? this.imgTabUp : this.imgTabDown;
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/switch-tabbar-position.html');

    Help Tab

  500. Tab Bar

    Code Tab

    function tbtoggle (thisBTN)
    {
    	thisBTN.checked = !thisBTN.checked;
    	if ( thisBTN.checked )
    	{
    		gBrowser.setStripVisibilityTo(false);
    		gBrowser.mPrefs.setBoolPref("browser.tabs.forceHide", true);
    	}
    	else
    	{
    		gBrowser.setStripVisibilityTo(true);
    		gBrowser.mPrefs.setBoolPref("browser.tabs.forceHide", false);
    	}
    }
    tbtoggle(this);
    

    Initialization Tab

    /*Initialization code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jet-plane');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-tabbar.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

  501. Tabs List

    Code Tab

    /* -------------------------------------------------------------
         Tabs List Menu
         by LouCypher (aka Zoolcar9)
         Displays opened tabs
       ------------------------------------------------------------- */
    

    Initialization Tab

    this.tabList = function(node) {
      var tabs = gBrowser.mTabs;
      for(var j = 0; j < tabs.length; j++) {
        mi = document.createElement("menuitem");
        mi.setAttribute("label", tabs[j].label);
        if(tabs[j].selected) mi.style.fontWeight = "bold";
        mi.setAttribute("oncommand", "gBrowser.selectedTab = gBrowser.mTabs[" + j + "]");
        node.appendChild(mi);
      }
    }
    this.removeList = function(node) {
      var list = node.childNodes.length;
      for(var i = 0; i < list; i++) {
        node.removeChild(node.lastChild);
      }
    }
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.tabList.bind(this);
    mPopup.popupHidden = this.removeList.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this)");
    mPopup.setAttribute("onpopuphidden", "this.popupHidden(this)");
    this.appendChild(mPopup);
    this.type = "menu";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/tabs-list-button-menu.html');

    Help Tab

  502. Test Code

    Code Tab

    /*Code*/
    try {
      var code = gClipboard.read();
      if (code.search(/;/) > -1) {
        try {
          new Function(code)();
        } catch(e) {
          custombuttons.alertBox(this.label, e);
        }
      } else {
        custombuttons.alertSlide(this.label, "clipboard missing semicolon");
      }
    } catch(e) {
      custombuttons.alertSlide(this.label, "clipboard empty");
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/test-code.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.0.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  503. Text Size

    Code Tab

    /* --------------------------------------------------------
         Text Size
         Use left click to increase, right click to decrease,
         and middle click to reset text size to normal
       -------------------------------------------------------- */
    

    Initialization Tab

    this.textResize = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
      switch(evt.button) {
        case 0:
          ZoomManager.prototype.getInstance().enlarge();
          break;
        case 1:
          ZoomManager.prototype.getInstance().reset();
          break;
        case 2:
          ZoomManager.prototype.getInstance().reduce();
      }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.textResize(event);");
    this.setAttribute("context", "");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/text-size-buttons.html');

    Help Tab

  504. Text Size Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var mPopup = document.getElementById("viewTextZoomMenu")
                   .getElementsByTagName("menupopup")[0].cloneNode(true);
    this.appendChild(mPopup);
    this.type = "menu";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/text-size-buttons.html');

    Help Tab

  505. Text Size Selector

    Code Tab

    /*Code*/
    bbcode.bbcode('size','bbcode');

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    /*---------------------- Show Focus Block Start ------------------------*/
    /* -------------- un-comment to show mouseover effects ----------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20070910.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-size-selector.html');
    this.setAttribute('dependency','bbcode ext');
    this.setAttribute('status','dev');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    /*Help*/
    Left-click opens text size selector 
     note:  the cursor must be in a text box
     This button requires the BBCode extension.
     https://addons.mozilla.org/firefox/128/
  506. ThumbsDown - Download All Images

    Code Tab

    // see initialization code

    Initialization Tab

    this.setAttribute("author","Atte Kemppilä");
    this.setAttribute("version", "0.1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/thumbsdown-download-all-images.html');
    this.setAttribute("dependency", "ThumbsDown 0.13");
    this.setAttribute("status", "Development");
    this.setAttribute("public", true);
    this.tooltipText = "ThumbsDown\nDownload all images from\nL: Current Tab\nM: All Tabs\nR: Current Tab and Close";
    // custom button click handler
    this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)"); 
    // disable context menu
    this.setAttribute("context", "");
    this.leftclick  = function(e) { this.downloadFromCurrentTab(); }
    this.midclick   = function(e) { this.downloadFromAllTabs(); }
    this.rightclick = function(e) { this.downloadFromCurrentTabAndClose(); }
    this.downloadFromCurrentTab = function()
    {
      this.downloadFromBrowser(gBrowser.selectedBrowser);
    }
    this.downloadFromCurrentTabAndClose = function()
    {
      this.downloadFromCurrentTab();
      gBrowser.removeCurrentTab();
    }
    this.downloadFromAllTabs = function()
    {
      this.downloadFromBrowsers(gBrowser.browsers);
    }
    this.downloadFromBrowser = function(browser)
    {
      gThumbsDown.activate(browser);
      gThumbsDown.selectAll(browser);
      gThumbsDown.download(browser);
    }
    this.downloadFromBrowsers = function(browsers)
    {
      if (browsers.length > 0)
      {
        this.downloadFromBrowser(browsers[0]);
        // non-zero delay so that dta window has time to start opening if it's not yet opened
        var self = this;
        setTimeout(function() { self.downloadFromBrowsers(browsers.slice(1)); }, 1);
      }
    }
    

    Help Tab

  507. Thunderbird

    Code Tab

    /*Code*/

    Initialization Tab

    var label='Thunderbird';
    var img='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANkE3LLaAgAAA1lJREFUeJxtk21MlAUAx3/Pcw/Pcdw7cAHOFkwyU9goNcxl0tzCiRbLZKw0Zys/9aG1tuJTX/tiL7a5ZXNgW7XKhUoyzRWNSCHQUO5EQO8gjnuB4+6ee32eh+OevuTmtN+3//7//b/94AFOegNNpyYCPccuXql/sPs/hPvD/g9+bGk7tLU3GVaEQqnsHLkZ4s4/CZLJPBV28++scPr65x09Dx08drjbZRXE7pdb17eva6ghGFQITce4sZzGailBFAU87jIqXBYCwcT49J3YkZkTB8cBTB8N/O1yO60DZnW1Zc/Ox+m/OEUumGZ8USG9nMDtcVLhtNCw3oPVIjPmi1SLgtBZ/cj2L6NTl1TJY7V+5l1aaNpVFWJwwEZlagm/yclkIA5pneDYH2x78UnGtAKplIZZFAjfWnAZsfRx4A1xNpQ6fOOnn9lasUy1yyCgxKnJT3B+f5zzBxW+eLVI/fwgRX2ViG8RKaaSCyyhRlKHALPw1JvdxoHmGtz+PpL2Sjrbt/OoXaeYVzBUBdQMRkFjx6cm1KwVoczErDeGbJFx1dtaJf9ogG+9c3x9bDej/X3UbtyEUdAQ1QyGqlDMK/z6/VncSZGJ9DrkvEhlXRXmok40Mm+ViqJM17tbyOLE5nRwtf8yz7a14r/t59yJkxh5hebnGqlreYboeBx7uQO/N4RYaiKfyEqCfe37yT/7X3c2NlZBscCH+zqw2q00PL2BXW07KDPDYk7glM/DhdOXKK1rIh7LEhydJqFcaBLszqPf7H2h7LWPu2rxrHkCucwFKypoWQwtg6Fn0DSdEi1B09s+rI0tRCN5UqG5pdT0JxtMuiZfmwuXv3Wub1ie8V0lE/XhkNPIFBFXddBziFqK65MKX303SS5XoJgKk50b/aGwGjpjgmDaECz+rLZ277XxKL2XI+Gzv9y+MnX3rl5YWXbabIZJliSOn0lyczKKnoiSWQzltNWZo6CG77lgLhE3dUjm2vcKaqRPNIx5EEwGusPlEDe+8tLmPb8NxT2yLDEbCGq5lbl3ioR7gML9MklQXgUem4TdYUJw1Natce1rf/7IX8O32kokieDCQnDGP9RVJNkLZB+y8T9E2GyCqNR5oHPn0OBQY/O2LXUjI8PeYGSsF4gAxr3xv8q6iztYFlqNAAAAAElFTkSuQmCC';
    var path='C:/Program Files/Mozilla Thunderbird/thunderbird.exe';
    //var path='c:/windows/explorer.exe';
    var args='';
      this.label=label;
      this.setAttribute('oncommand','this.startProcess("'+path+'","'+args+'")');
      this.image=img;
      this.tooltipText = label;
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\')); 
    // file.launch();
     process.init(file);
     process.run(false,[args],1); 
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/thunderbird-launcher.html');

    Help Tab

  508. Thunderbird Compose

    Code Tab

    /* ***** BEGIN LICENSE BLOCK *****
     * Version: MPL 1.1/GPL 2.0/LGPL 2.1
     *
     * The contents of this file are subject to the Mozilla Public License Version
     * 1.1 (the "License"); you may not use this file except in compliance with
     * the License. You may obtain a copy of the License at
     * http://www.mozilla.org/MPL/
     *
     * Software distributed under the License is distributed on an "AS IS" basis,
     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     * for the specific language governing rights and limitations under the
     * License.
     *
     * The Original Code is Compose Button for Custom Buttons extension.
     *
     * The Initial Developer of the Original Code is LouCypher.
     * Portions created by the Initial Developer are Copyright (C) 2007
     * the Initial Developer. All Rights Reserved.
     *
     * Contributor(s):
     *  LouCypher <loucypher.moz@gmail.com>
     *
     * Alternatively, the contents of this file may be used under the terms of
     * either the GNU General Public License Version 2 or later (the "GPL"), or
     * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     * in which case the provisions of the GPL or the LGPL are applicable instead
     * of those above. If you wish to allow use of your version of this file only
     * under the terms of either the GPL or the LGPL, and not to allow others to
     * use your version of this file under the terms of the MPL, indicate your
     * decision by deleting the provisions above and replace them with the notice
     * and other provisions required by the GPL or the LGPL. If you do not delete
     * the provisions above, a recipient may use your version of this file under
     * the terms of any one of the MPL, the GPL or the LGPL.
     *
     * ***** END LICENSE BLOCK ***** */
    // Launch Thunderbird Compose from Firefox
    this.launchTBCompose();
    

    Initialization Tab

    const Cc = Components.classes, Ci = Components.interfaces;
    const nsIWindowsRegKey = Ci.nsIWindowsRegKey;
    const winReg = Cc["@mozilla.org/windows-registry-key;1"]
                     .createInstance(nsIWindowsRegKey);
    var regRoot = Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE;
    var tbRegKey = "SOFTWARE\\Mozilla\\Mozilla Thunderbird";
    var prefString = "custombuttons.tbCompose";
    function getTBPath() {
      var version, path2exe;
      // get TB path from preferences
      path2exe = nsPreferences.getLocalizedUnicharPref(prefString);
      if (!path2exe) {
        try { // get TB version in registry
          winReg.open(regRoot, tbRegKey, nsIWindowsRegKey.ACCESS_READ);
          version = winReg.readStringValue("CurrentVersion");
          winReg.close();
        } catch(ex) {
          version = null; // TB is not installed
        }
        if (version) {
          try { // get TB path in registry
            var regKey = tbRegKey + "\\" + version + "\\Main";
            winReg.open(regRoot, regKey, nsIWindowsRegKey.ACCESS_READ);
            path2exe = winReg.readStringValue("PathToExe");
            winReg.close();
          } catch(ex) {
            return null; // TB is not installed
          }
        } else { // get TB path in your computer
          const nsIFilePicker = Ci.nsIFilePicker;
          var fp = Cc['@mozilla.org/filepicker;1']
                      .createInstance(nsIFilePicker);
          fp.init(window, "Get Thunderbird Directory", nsIFilePicker.modeOpen);
          fp.appendFilters(nsIFilePicker.filterApps);
          if(fp.show() == nsIFilePicker.returnOK) {
            path2exe = fp.file.path;
          } else {
            return false; // cancel process
          }
        }
        // save TB path in preferences
        nsPreferences.setUnicharPref(prefString, path2exe);
      }
      return path2exe;
    }
    this.launchTBCompose = function() {
      var tbExe = getTBPath();
      if (tbExe == null) {
        return alert("Thunderbird is not installed.");
      } else if (!tbExe) {
        return;
      } else {
        var app = Cc["@mozilla.org/file/local;1"]
                    .createInstance(Ci.nsILocalFile);
        app.initWithPath(tbExe);
        var process = Cc["@mozilla.org/process/util;1"]
                        .createInstance(Ci.nsIProcess);
        process.init(app);
        process.run(false, ["-compose"], 1);
      }
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/thunderbird-compose-firefox.html');

    Help Tab

  509. Thunderbrowse

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ---------------------*/
    this.leftclick   = function(evt){
    	urlbarcollapse();
    }
    this.midclick    = function(evt){
    	loadHomePage();
    }
    this.rightclick  = function(evt){
    	bigtime();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20071130.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/thunderbrowse-button-thunderbird.html');
    this.setAttribute('dependency','Thunderbrowse');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText += 'L: Toggle TBrowser | New Tab | Maximize/Minimize';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    /*Help*/
    This button is for Thunderbird with ThunderBrowse extension
         https://addons.mozilla.org/en-US/thunderbird/addon/5373
         Left-click: Toggle ThunderBrowse
         Middle-click: Open new tab
         Right-click: Toggle min/max
         Shift-Right-click: Context Menu
         
  510. Thunderbrowse

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ---------------------*/
    this.leftclick   = function(evt){
    	urlbarcollapse();
    }
    this.midclick    = function(evt){
    	loadHomePage();
    }
    this.rightclick  = function(evt){
    	bigtime();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20071130.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/thunderbrowse-button-thunderbird.html-0');
    this.setAttribute('dependency','Thunderbrowse');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    this.tooltipText += 'L: Toggle TBrowser | New Tab | Maximize/Minimize';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    /*Help*/%0A%0AThis%20button%20is%20for%20Thunderbird%20with%20ThunderBrowse%20extension%0A%20%20%20%20%20https%3A//addons.mozilla.org/en-US/thunderbird/addon/5373%0A%20%20%20%20%20%0A%20%20%20%20%20%0A%20%20%20%20%20Left-click%3A%20Toggle%20ThunderBrowse%0A%20%20%20%20%20Middle-click%3A%20Open%20new%20tab%0A%20%20%20%20%20Right-click%3A%20Toggle%20min/max%0A%20%20%20%20%20%0A%20%20%20%20%20Shift-Right-click%3A%20Context%20Menu%0A%20%20%20%20%20
  511. timeOut Demo

    Code Tab

    /*CODE*/
        oBtn = this;
        this.origImage = this.image;
        this.brighterImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAA21BMVEUAAAD///8XgREJcgUJcgZAgjhFkUI8kTU8gjU+kDg7ki89kDIFfAIJgQcJgAULgwUIeAVKozVBkj5LojgIdwUJgwUJgwUFgAIJggV87wAAfwCGxoKJ1IYsnSd/0XF90Wp/0miC2GZ70mSA03OV25eEx4CZ3JqD1Hd701x20FRzz1F20VV31VlwzVZpyVRkxlQimx0xnyeC02aC1GGE11+G2Ft41Et100dy0kN51Ex/1VJ40k9xzk1syk0lnRp902h42Dx22Dl74Sp64SiG04Kt+0et/EeJ4jaL5DaILThaAAAAGXRSTlMAANK5ucrX2MzX1tWwtbS0tOjZ57O0tbK0BdoPCwAAAIFJREFUeF5lzUUSwzAMQFE7XGaww2VmZm7vf6K6Sb2Q8zfSvIWEMPolS5ISLPgPhtlUAeRbDQ2Abj1iAOLteoJDMpXOZHPnWqFYqpYrDGzH9fxOt9cfDEfjCYPpbL5Yrtab7W5/OJ4Y0KDLNZz8KL3dKfhCCRHg+RLg/RGAxQEWhS8Y8wzxyy6r3wAAAABJRU5ErkJggg==";
        this.setOrigImg = function(){
              this.image = this.origImage;
        };
        this.image = this.brighterImage;
        window.setTimeout(function() { oBtn.setOrigImg(); }, 2000);
    

    Initialization Tab

    /*Initialization Code*/
    /*------------------ Custom Buttons2 Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20080127.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons2 Attributes Block End -------------------*/

    Help Tab

  512. Timer

    Code Tab

    /*Code*/

    Initialization Tab

    function seconds2HMS(inputval){
    	var hh = Math.floor(inputval / 3600);
    	var ss_remaining = (inputval - (hh * 3600));
    	var mm = Math.floor(ss_remaining / 60);
    	var ss = (ss_remaining - (mm * 60));	
    	if(hh<10){
    		hh='0'+hh;
    	}
    	if(mm<10){
    		mm='0'+mm;
    	}
    	if(ss<10){
    		ss='0'+ss;
    	}
    	return hh+':'+mm+':'+ss;
    }
    this.leftclick = function(evt){
    	var time=prompt('Insert time in seconds.\nyou can use math ex:\n60*2 which is 2 minutes.\nThe below value is 2 minutes and 15 seconds.','60*2+15');
    	try{
    		time=eval(time);
    		if(isNaN(time)===false&&time){
    			if(confirm('Is '+seconds2HMS(time)+' the correct time?')===true){
    				setTimeout("alert('RING RING:\\n"+prompt('What is the event?','The pot is about to boil over!')+"')",time*1000);
    				alert('Will ring in\n'+seconds2HMS(time));
    			}
    			else{
    				this.click();
    			}
    		}
    	}
    	catch(e){
    		alert('Data Input Error');
    	}
    }
    this.setAttribute('onclick',"gQuot(event,this)");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/timer.html');

    Help Tab

  513. TimeStamp

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.ts( 0 );
    };
    this.sleftclick = function(evt)
    {
      this.ts( 1 );
    };
    this.ts = function( tmode ){
      /* Constants    */ var c=":", b=" ", hs = String.fromCharCode(160);
      /* Date         */ var t=new Date();
      /* Year         */ var y=1900+t.getYear();
      /* Minutes      */ var min=t.getMinutes(); if (min<10){min="0"+min};
      /* Seconds      */ var s=t.getSeconds(); if (s<10){s="0"+s};
      let h = 0, ap = "";
      if ( tmode === 0 ) {
        /* Time 12 Hour */
        h = t.getHours();
        ap="AM";
        if (h>=12) ap="PM";
        if (h>12) h=h-12;
        if (h==0) h=12;
        h = h + c + min + c + s + b + ap;
      }
      else{
        /* Time 24 Hour */
        h = t.getHours();
        if (h<=9) h = "0" + h;
        h = h + c + min + c + s + hs + hs + hs + hs;
      }
      /* Day of Week  */ var dw=t.getDay();switch(dw){case 0: dw="Sun";break;case 1: dw="Mon";break;case 2: dw="Tue";break;case 3: dw="Wed";break;case 4: dw="Thu";break;case 5: dw="Fri";break;default: dw="Sat";}
      /* Month        */ var m=t.getMonth();switch(m){case 0: m="Jan";break;case 1: m="Feb";break;case 2: m="Mar";break;case 3: m="Apr";break;case 4: m="May";break;case 5: m="Jun";break;case 6: m="Jul";break;case 7: m="Aug";break;case 8: m="Sep";break;case 9: m="Oct";break;case 10: m="Nov";break;default: m="Dec";}
      /* Day of Month */ var d=t.getDate();
      /* Time Zone    */ var tz=String(t).substring(25);
      /* Output       */ var p=dw+b+m+b+d+b+y+b+h+b+tz;
      content.document.body.innerHTML = "<table width=100%><tr><td align=right>" + p + "</td></tr></table>" + content.document.body.innerHTML;
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','cblover, SCClockDr');
    this.setAttribute('version','20090212.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-timestamp-comment-url.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText += "\nL\t12 Hr TimeStamp\nL+S\t24 Hr TimeStamp";
    

    Help Tab

    ********************************************************************
        cblover http://minidata.googlepages.com/
       Date-Time Stamp:  Fri Jan 19 2007 11:21:09 PM GMT-0800 (Pacific Standard Time)
                         Fri Jan 19 2007 23:21:09    GMT-0800 (Pacific Standard Time)
       Comment:          Any desired comment
       Add URL:          http://minidata.googlepages.com/
         cblover http://minidata.googlepages.com/
         SCClockDr
           Joined: 25 Dec 2006  
           Location: SC UpState
         is the primary author of this 12|24 version of the Date-Time Stamp code.
       Left Click ---------> 12 hour TimeStamp
       Shift+Left Click ---> 24 hour TimeStamp
       Middle Click -------> Add a Comment
       Shift-Right Click --> custom button menu
       Right Click --------> Add URL
    
  514. TimeStamp

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.ts( 0 );
    };
    this.sleftclick = function(evt)
    {
      this.ts( 1 );
    };
    this.ts = function( tmode ){
      /* Constants    */ var c=":", b=" ", hs = String.fromCharCode(160);
      /* Date         */ var t=new Date();
      /* Year         */ var y=1900+t.getYear();
      /* Minutes      */ var min=t.getMinutes(); if (min<10){min="0"+min};
      /* Seconds      */ var s=t.getSeconds(); if (s<10){s="0"+s};
      let h = 0, ap = "";
      if ( tmode === 0 ) {
        /* Time 12 Hour */
        h = t.getHours();
        ap="AM";
        if (h>=12) ap="PM";
        if (h>12) h=h-12;
        if (h==0) h=12;
        h = h + c + min + c + s + b + ap;
      }
      else{
        /* Time 24 Hour */
        h = t.getHours();
        if (h<=9) h = "0" + h;
        h = h + c + min + c + s + hs + hs + hs + hs;
      }
      /* Day of Week  */ var dw=t.getDay();switch(dw){case 0: dw="Sun";break;case 1: dw="Mon";break;case 2: dw="Tue";break;case 3: dw="Wed";break;case 4: dw="Thu";break;case 5: dw="Fri";break;default: dw="Sat";}
      /* Month        */ var m=t.getMonth();switch(m){case 0: m="Jan";break;case 1: m="Feb";break;case 2: m="Mar";break;case 3: m="Apr";break;case 4: m="May";break;case 5: m="Jun";break;case 6: m="Jul";break;case 7: m="Aug";break;case 8: m="Sep";break;case 9: m="Oct";break;case 10: m="Nov";break;default: m="Dec";}
      /* Day of Month */ var d=t.getDate();
      /* Time Zone    */ var tz=String(t).substring(25);
      /* Output       */ var p=dw+b+m+b+d+b+y+b+h+b+tz;
      content.document.body.innerHTML = "<table width=100%><tr><td align=right>" + p + "</td></tr></table>" + content.document.body.innerHTML;
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','cblover, SCClockDr');
    this.setAttribute('version','20090212.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/add-timestamp-comment-url.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    this.tooltipText += "\nL\t12 Hr TimeStamp\nL+S\t24 Hr TimeStamp";
    

    Help Tab

    ********************************************************************
        cblover http://minidata.googlepages.com/
       Date-Time Stamp:  Fri Jan 19 2007 11:21:09 PM GMT-0800 (Pacific Standard Time)
                         Fri Jan 19 2007 23:21:09    GMT-0800 (Pacific Standard Time)
       Comment:          Any desired comment
       Add URL:          http://minidata.googlepages.com/
         cblover http://minidata.googlepages.com/
         SCClockDr
           Joined: 25 Dec 2006  
           Location: SC UpState
         is the primary author of this 12|24 version of the Date-Time Stamp code.
       Left Click ---------> 12 hour TimeStamp
       Shift+Left Click ---> 24 hour TimeStamp
       Middle Click -------> Add a Comment
       Shift-Right Click --> custom button menu
       Right Click --------> Add URL
    
  515. Tiny Menu

    Code Tab

    /*CODE*/
    

    Initialization Tab

    var menuName="main-menubar";
    var menu=document.createElement('menupopup');
    var hide_this=new Array;
    hide_this.push("file-menu");
    hide_this.push("edit-menu");
    hide_this.push("view-menu");
    hide_this.push("go-menu");
    hide_this.push("bookmarks-menu");
    hide_this.push("ScrapBookMenu");
    hide_this.push("tools-menu");
    hide_this.push("helpMenu");
    for (var i=0;i<document.getElementById(menuName).childNodes.length;i++)
    {
    	document.getElementById(menuName).childNodes[i].hidden=false;
    	var subMenu=document.getElementById(menuName).childNodes[i].cloneNode(true);
    	for(var j=0;j<hide_this.length;j++)
    	{
    		if(subMenu.id==hide_this[j])
    		{
    			document.getElementById(menuName).childNodes[i].hidden=true;
    			menu.appendChild(subMenu);
    		}
    	}
    }		
    function setToolTip(Menu)
    {
    	for(var i=0;i<Menu.childNodes.length;i++)
    	{
    	  if(Menu.childNodes[i].hasChildNodes)
    	  {
    		if(Menu.childNodes[i].hasAttribute('label'))
    		{
    			Menu.childNodes[i].toolTipText=Menu.childNodes[i].getAttribute('label');
    		}
    		Menu.childNodes[i]=setToolTip(Menu.childNodes[i]);
    		//alert(Menu.childNodes[i].toolTipText);
              }
    	}
    return (Menu);
    }
    menu=setToolTip(menu);
    //alert(menu.childNodes[3].toolTipText);
    //this.setAttribute("class", "menu-iconic");
    this.appendChild(setToolTip(menu));
    this.type = 'menu';
    //alert('done');
    // BUTTON ATTRIBUTES
    this.setAttribute("author",'deepakjoshi04');								// Stores Author.
    this.setAttribute("version",'20060826.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/tiny-menu-button.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

  516. Tiny Menu

    Code Tab

    /*CODE*/
    

    Initialization Tab

    var menuName="main-menubar";
    var menu=document.createElement('menupopup');
    var hide_this=new Array;
    hide_this.push("file-menu");
    hide_this.push("edit-menu");
    hide_this.push("view-menu");
    hide_this.push("go-menu");
    hide_this.push("bookmarks-menu");
    hide_this.push("ScrapBookMenu");
    hide_this.push("tools-menu");
    hide_this.push("helpMenu");
    for (var i=0;i<document.getElementById(menuName).childNodes.length;i++)
    {
    	document.getElementById(menuName).childNodes[i].hidden=false;
    	var subMenu=document.getElementById(menuName).childNodes[i].cloneNode(true);
    	for(var j=0;j<hide_this.length;j++)
    	{
    		if(subMenu.id==hide_this[j])
    		{
    			document.getElementById(menuName).childNodes[i].hidden=true;
    			menu.appendChild(subMenu);
    		}
    	}
    }		
    function setToolTip(Menu)
    {
    	for(var i=0;i<Menu.childNodes.length;i++)
    	{
    	  if(Menu.childNodes[i].hasChildNodes)
    	  {
    		if(Menu.childNodes[i].hasAttribute('label'))
    		{
    			Menu.childNodes[i].toolTipText=Menu.childNodes[i].getAttribute('label');
    		}
    		Menu.childNodes[i]=setToolTip(Menu.childNodes[i]);
    		//alert(Menu.childNodes[i].toolTipText);
              }
    	}
    return (Menu);
    }
    menu=setToolTip(menu);
    //alert(menu.childNodes[3].toolTipText);
    //this.setAttribute("class", "menu-iconic");
    this.appendChild(setToolTip(menu));
    this.type = 'menu';
    //alert('done');
    // BUTTON ATTRIBUTES
    this.setAttribute("author",'deepakjoshi04');								// Stores Author.
    this.setAttribute("version",'20060826.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/tiny-menu-button.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

  517. Toggle Referer

    Code Tab

    this.doLeft(event);

    Initialization Tab

    this.pref='network.http.sendRefererHeader';
    this.setState=function(){
     var state=this.PS.getIntPref(this.pref);
     var imageOn = '\
     data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAMCAYAAAELwp3eAAAA\
     KnRFWHRDcmVhdGlvbiBUaW1lAIyOIDIyIDExIDIwMDQgMDM6MjE6MTQgKzA5MDBZZECTAA\
     AAB3RJTUUH1AsWBgs2bxr9KwAAAAlwSFlzAAAK8AAACvABQqw0mAAAAARnQU1BAACxjwv8\
     YQUAAAKBSURBVHjanVPNaxNBFJ/ZTTa7WRNNyJZArJVAJWBJDwrdIAkNHtqCBwVBEUsES1\
     Hwogf/gB489CBF/DiIQqNevEQvpmAhFFpICEo1kkJaiNLE0GAlSfOx6+5mnAlNTdN2Cw68\
     efPezO+993szA0DXgGTyhX3fOZ5zph6mPC2v+ELkiaaw2Bgz80s4J5yEgdeBGvE6HU6qXC\
     mDMf8YG12KFncFxFALkbZtaKNCF0Nmoq1WaxFC2MpsI46J7MRvSEEQuRrpx1rtLhEEXgXe\
     xKtxNPJ2RCLaP+uvt0vf4TH5abIB0D8Hx3FGoUegY7GYFAwGWU3RQP5nXtpDvqt4KJflWz\
     iQAZvG0pfSQjac/YrXii4IqyPbe1r8ZrzWfYbqAjD2o/byzJWZSm9Pb8nv9W+Jz8Tbe+6m\
     3ToyEELU+IVxFuHaFj8vouGhYRj5GCkpmvKnE2TweDy7shXVIiDk61odFBoF0Ofu4xVFYb\
     sbYWsb7pBbGLgxkBZOCHQ+k0eufhdML6Tfrb1cu6vbPe8Dr5dm6fNYTqlVNbF8f/kDKUAX\
     tE83bRaz5R5eXsaPhG6ipoI5H8d2BUsD208aUuM57nJdLw7Egbw6+6cZhnk6fWn62DpYx5\
     ergHA0LLkEl2n07CgkTU6sJORkOrlSKVTusAK7dWCiqR9TSCcR4EwcYExMa62qKpiLzUkO\
     u8MknhF3ukH8hw3D/NL8+6bcpPbbbIKmBdJQHBwaZHkLDzRVAypSQU2rgVwj1zqzkd8Aq9\
     9WZUwu14IcxOiwSnyzvuv4pz5ieIbGT1uTSzIPGWgw8aYyUhElV+XqZnLzWuZxJoWPl/47\
     USd7LMYODLHVbRbkb2p64L886/rMrAsLAgAAAABJRU5ErkJggg==';
     var imageOff = '\
     data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAMCAYAAAELwp3eAAAA\
     KnRFWHRDcmVhdGlvbiBUaW1lAIyOIDIyIDExIDIwMDQgMDM6MjE6MTQgKzA5MDBZZECTAA\
     AAB3RJTUUH1AsWBgwQ8lbuEQAAAAlwSFlzAAAK8AAACvABQqw0mAAAAARnQU1BAACxjwv8\
     YQUAAAMmSURBVHjahVR9SBNhGH/vvNtum80KRJFJWtFCSUSJJCgyEUTtw4+EDdGaFkphIQ\
     n9k2AS/REIBZYQUX/kR1iwIepKlNSRhDg/AisDUVmaqbT8uG137+563rXJtYReeI/f87vn\
     +3nuEIJjLS7eRS7BNHkcNxrXY6Ki1k4nJCQg5aGupqcfOhoXdylKrT5M9ZjNW7Is09lFRV\
     xzS0vpybS0Z+tu95aEsYCCjqmQKWBdABAr4fVr+WVBQStxKVmtcr/FsszktrUZnHr9CkNR\
     +4niyugoujswcAwpXKj6KyvX5fFx+UVh4Y0Q76ipwV/u35c6CgurQxzztb7eA8kFBIPBwG\
     2MjCAR4+18VLIsxev1EarU1AczyclNgfKUtTZnZ6doWDZryOXqfz41NUW4F/n513mMf12x\
     23tA/IHCT7CVOoVMhVq74+k2m1tJPX0WixdElnBvysuthOsymXhlVgxpHQF7o6NpeX6eQP\
     lxTs7lBoejS5YkRLhTeXmaPo77TlN/7JiDBw4EhsppNKx3eRkhjFG13f4cKB6BEeFkvx/t\
     Mxj025EONTbGEdB14cJ4htG4D0aKWs+da2l0OG4TZY/LhSbn5nx3BgeP0DSNA0ZwfxLgl+\
     XELqezCtrPVPT2PiWRBIwbbGNjg6NLS0PvFhZI7uI/LVd0bY8mMrIWYDGiqAioTRQFwXKm\
     vf2DUu+txVIFmd0CGAHXI0lSs+D1Pjn/6hUf7pOMISWMS2ZVqke5dXW70doakqHEgc5Or4\
     /nuZCCKIoacOa1l5VZY+Ljc1MzM1kESzXjdPpmJiY+fXO7r8XqdBtKp8yJrKzJ8OhqjkPi\
     9HQAYwhEerjC87UXbbZnQAnbisD7PR4kkkHBSTQY1PGxsalky8N9MqPDwzYfxnSIgH7vYm\
     g6Iy0piYvUahEmKwHBorXapm6TqUlREVFGfp5H3sXFgO3S6ir6PDvrAx8uEKW/WrfTjGAz\
     SmHHHmpZNgIU/OuCoIOKblZ0d7eRIoNONntKSjrg/VmdSuXB8LPYEoTN9y6X+d7IyEd47/\
     5vIGXFwS8kpOcjDQvTYYMXBRMQd9BBvwEukXvaOhaKMwAAAABJRU5ErkJggg==';
     if (state==0){
      this.image = imageOff;
      this.checked=true;
     }else{
      this.image = imageOn;
      this.checked=false;
     }
    }
    this.doLeft = function(e) {
    var prefValue = custombuttons.getPrefs('network.http.sendRefererHeader');
      if (prefValue == 0) { custombuttons.setPrefs('network.http.sendRefererHeader',2); }
      else { custombuttons.setPrefs('network.http.sendRefererHeader',0); }
    }
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080306.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-referers.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    Click the button to toggle the preference for Referers 
    ('network.http.sendRefererHeader') between '2' and '0'
  518. Toggle Bold

    Code Tab

    this.toggleBold();

    Initialization Tab

    this.toggleBold = function() {
      var id = "cb-css-all-bold";
      var test = content.document.getElementById(id);
      if (test) {
        test.parentNode.removeChild(test);
        return;
      }
      var head = content.document.getElementsByTagName("head")[0];
      var style = head.appendChild(content.document.createElement("style"));
      style.id = id;
      style.innerHTML = "* { font-weight: bold !important; }";
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-boldnormal-fonts.html');

    Help Tab

  519. Toggle Boomarks

    Code Tab

    /* CODE */
    //  Edit the two vars below to suit your toggle needs.
    Firstbar = "nav-bar";
    Secondbar = "PersonalToolbar";
    function swapBars ( thisButton,  thisBar,  nextBar )
    {
    //  Function:
    // 
    //      Support for a CTB button which shows each toolbar in turn
    //
    //  Actions:
    //
    //      detect if a specified  toolbar is currently showing.
    //      Iif it is, then toggle it off and
    //                         ensure another specified toolbar is visible.
    //                         with exactly one copy of the CTB button on it.
    //
    //                  and return bool value true
    //     else
    //                  no action except
    //                  return bool value false
    //
    //  Parameters:
    //
    //                 The CTB button currency, always supplied as <this>
    //                  Id  of the toolbar to be checked, in quotes
    //                  id of the toolbar to be made visible in its place
    //                        ( if appropriate) also in quotes.
    //
    //  Return mode: Bool/Logical; true if and only if action was taken.
    //
    //==========================================================
    //  NOTE: If you created your CTB button on another bar than the Menubar
    //                 then you will need to change the toolbar id
    //                         in the lines where "toolbar-menubar" occurs.
    //==========================================================
       var old_toolbar;
       var new_toolbar;
       var uncollapsed
       if (  old_toolbar = document.getElementById( thisBar ),
            uncollapsed = !old_toolbar.collapsed
          )
         {
           //  Target toolbar is showing
           //  Show the replacement toolbar
            new_toolbar = document.getElementById(nextBar);
            new_toolbar.collapsed = !uncollapsed;
    //up arrow data
    thisButton.image =
    "data:image/gif;base64,R0lGODlhFwAXAIMAAAAAAISEhMbGxv/vSv///////////////////////////////////////////////yH5BAEAAAIALAAAAAAXABcAAARlUMgJqr24TmmJ/yAIbBgxnGh6juRlqirbAi+cymRtozin76uNgAaE4YjFGOWXHLCQzduwEo1hooFA8FrMArTPC9BbCci4KvJlRk15pxYh+s3RCOFUOuVOuZj5gHVxgYGDhIWHAhEAOw==";
            //  Copy this button to the newly revealed toolbar, unless it is the INSERTTOOLBARID1
            if (nextBar != Firstbar) new_toolbar.appendChild(thisButton.cloneNode(true));
           //  Remove  this button from  the about-to-be-hidden  toolbar, unless it is the INSERTTOOLBARID1
            if(thisBar != Firstbar) old_toolbar.removeChild(thisButton);
           //  Hide the target toolbar
           old_toolbar.collapsed = uncollapsed; 
    //down arrow data
    thisButton.image =
    "data:image/gif;base64,R0lGODlhFwAXAIMAAAAAAISEhMbGxv/vSv///////////////////////////////////////////////yH5BAMAAAIALAAAAAAXABcAAARmUMhJJag4T8C1t1z3YUAQitlFlcFwqlW4Be3gnjHO2vy7vjSe0GcxcYLCIU4AGJiQSaWs6axFky/qdXu7aLlRguoL5ok35eQZnbat2ek3HCyfb8Uoe5io3y8tBIGCg4MyP1mIeRIRADs=";
       }
       return uncollapsed  //  True iff target was showing and has been (possibly) replaced.
    }
    //  ==================================================================
    //  Then this bit uses the function to rotate an example subset of bars.
    //  Hopefully, the code which follows will be easy to change for new/removed  toolbars.
    //  ==================================================================
    if         ( swapBars(  this, Firstbar, Secondbar ) ) 
    {
    }
    else if ( swapBars( this, Secondbar, Firstbar ) ) 
    {
    }
    // ^^THIS LAST SECTION CAN GO ON FOREVER
    // JUST BE SURE TO END THE CODE WITH:
    // else if ( swapBars( this,"INSERTLASTTOOLBARID", "INSERTTOOLBARID1" ) ) {}
    //down arrow data
    //thisButton.image =
    //"data:image/gif;base64,R0lGODlhIAAgAIMAAAAAAISEhMbGxv/vSv///////////////////////////////////////////////yH5BAMAAAIALAAAAAAgACAAAAR3UMhJq7046827/6AGhB1gkqJ5ohYQqCs4Um4wwLOnTvXg4zqYoOf7CTk4YtG427hUAdtyCRQNXtGptooB+LLa7fHiDZuZ1rOZkOuqw2zkexqXz311+zyvV/P7a00lb2xjTntcIgSLjI2Ngk5JkpAslZaXmJmaFBEAOw==";
    

    Initialization Tab

    /*Initialization Code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-between-main-or-bookmarks-toolbars.html');

    Help Tab

  520. Toggle Chrome

    Code Tab

    /*Code*/

    Initialization Tab

    function hideChrome() {
      if (navigator.platform == "Win32") {
        window.moveTo(0,0);
        window.maximize();
        document.getElementById("main-window").setAttribute('hidechrome','true');
        // preserve small area for taskbar to appear
        window.resizeTo(screen.availWidth, screen.availHeight-2);
      } else {
        document.getElementById("main-window").setAttribute('hidechrome','true');
        window.moveTo(0,0);
        window.resizeTo(screen.availWidth, screen.availHeight);
        window.maximize();
      }
    }
    // COMMENT OUT THE NEXT LINE TO START BROWSER NORMALLY
    hideChrome();
    this.leftclick   = function(evt){
      function showChrome() {
        if (navigator.platform == "Win32") {
          document.getElementById("main-window").setAttribute('hidechrome','false');
          window.resizeTo(screen.availWidth, screen.availHeight);
          window.maximize();
          window.resizeTo(screen.availWidth, screen.availHeight);
        } else {     
          document.getElementById("main-window").setAttribute('hidechrome','false');
          window.maximize();
          window.maximize();
        }
      }
      function toggleChrome() {
        var mainWindow = document.getElementById("main-window");
        var isFullScreen = mainWindow.getAttribute('hidechrome');
        if (isFullScreen == "" || isFullScreen == 'false') {
          hideChrome();
        } else {
          showChrome();
        }
      }
    toggleChrome();
    }
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080306.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-chrome.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    ********************************************************************        
     Toggles window chrome for your browser.         
     Makes the window almost chromeless meaning no titlebar         
     but taskbar should still be accessible.         
     Convenient for going fullscreen without losing all         
     those useful toolbars and the windows taskbar.        
     By default this button makes the browser startup chromeless         
     you can change this by commenting out the appropriately marked         
     line of code in the button's initialization tab.         
    ********************************************************************        
     Directly Clicking on the Button does the following:        
         L = Toggles Chrome         
         Any Other Click = Custom Buttons Context Menu        
    ********************************************************************
  521. Toggle Chrome/Maximized

    Code Tab

    /*Code*/

    Initialization Tab

    function hideChrome() {
      if (navigator.platform == "Win32") {
        window.moveTo(0,0);
        window.maximize();
        document.getElementById("main-window").setAttribute('hidechrome','true');
        // preserve small area for taskbar to appear
        window.resizeTo(screen.availWidth, screen.availHeight-2);
      } else {
        document.getElementById("main-window").setAttribute('hidechrome','true');
        window.moveTo(0,0);
        window.resizeTo(screen.availWidth, screen.availHeight);
        window.maximize();
      }
    }
    // COMMENT OUT THE NEXT LINE TO START BROWSER NORMALLY
    hideChrome();
    this.leftclick   = function(evt){
      function showChrome() {
        if (navigator.platform == "Win32") {
          document.getElementById("main-window").setAttribute('hidechrome','false');
          window.resizeTo(screen.availWidth, screen.availHeight);
          window.maximize();
        } else {     
          document.getElementById("main-window").setAttribute('hidechrome','false');
          window.maximize();
        }
      }
      function toggleChrome() {
        var mainWindow = document.getElementById("main-window");
        var isFullScreen = mainWindow.getAttribute('hidechrome');
        if (isFullScreen == "" || isFullScreen == 'false') {
          hideChrome();
        } else {
          showChrome();
        }
      }
    toggleChrome();
    }
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute("author",'nicholas');								// Stores Author.
    this.setAttribute("version",'20080622.00');                                                 	// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-chrome.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

    ********************************************************************        
     Toggles window chrome for your browser.         
     Makes the window almost chromeless meaning no titlebar         
     but taskbar should still be accessible.         
     Convenient for going fullscreen without losing all         
     those useful toolbars and the windows taskbar.        
     By default this button makes the browser startup chromeless         
     you can change this by commenting out the appropriately marked         
     line of code in the button's initialization tab.         
    ********************************************************************        
     Directly Clicking on the Button does the following:        
         L = Toggles Chrome         
         Any Other Click = Custom Buttons Context Menu        
    ********************************************************************
  522. Toggle Cookies

    Code Tab

    this.toggleCookieBehavior();

    Initialization Tab

    var prefService = Components.classes["@mozilla.org/preferences-service;1"]
                        .getService(Components.interfaces.nsIPrefService);
    var prefDomain = "network.cookie.cookieBehavior";
    function pref() {
      var p = prefService.getIntPref(prefDomain);
      return p;
    }
    this.toggleCookieBehavior = function() {
      if(pref() == 2) {
        prefService.setIntPref(prefDomain, 1);
        this.image = "data:image/png;base64,\
    iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAEG0lEQVR4AQEQBO/7AAAA\
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACweQYQsHkGIAAAAAAAAAAAAAAAAAAAAAAA\
    AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAALB5Bg4EBw6B//78W////Q0CAwb6/vz5\
    BwIGDsnz8u+TjL8qrs3Nzf4AA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n54MAU8bbMAAAA9wAAAAAAAAAAAAAAAAMAAAAAAAAAAOsA\
    K+3D2w+oHwvmIPLt6yDc+Ta01d7zyP8BBc74Bx8RHOqYeQj75eHNzc38AAAAAAAAAAAA\
    AAAAAQAAAAAAAAAAAAAAADMzMwEAAAANIRP0JuPvCgT8/gLqAAAA7QAAAP8AAAD5zc3N\
    +QAAAAAAAAAAAAAAAAAAAABrVopN4kjJMgAAAABJRU5ErkJggg==";
      } else {
        prefService.setIntPref(prefDomain, 2);
        this.image = "data:image/png;base64,\
    iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAEG0lEQVR4AQEQBO/7AAAA\
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACweQYQsHkGIAAAAAAAAAAAAAAAAAAAAAAA\
    AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAALB5Bg4EBw6B//78W////Q0CAwb6/vz5\
    BwIGDsnz8u+TjL8qrs3Nzf4AAAAAAAAAAAEAAAAAAAAAAAAAAACweQZXBgoRkyExSg0c\
    IysIDA0HAPLt6gAMDQcA6uPfAN7Y1e7s6ujJ2uHzbKjPIODNzc3+AwAAAAAAAAAAsHkG\
    WRIcMYg3TGwaGhwTBAb/5QDy6NMAyb3EACQg+wAMC/0ACwwOCQYHCCD99/A7Af72u/sI\
    JfIDMzMzAZdg7Q4CAwbEPFV4FAsG7wDy5s0AB//jAAcC7AAjIAEAAPzwAPLu7ADLxt4A\
    ODsfA/f3/xP9+fMRzOAMvwIAAAADBQkRdSM0UQEJBfQA8ufSAMm/ywAA+ukAAPzxAAD9\
    9AAA/vcA//31AC8uBwD28ekACQf7CBEK+00AAAAZBCoX8QUDBQhLHicvBwD55AAOCe8A\
    RUQOAAD++gDy8vsACQoEANDS7/vg5v7y9vsH8g0F6xL5/Qj0tdAOnwAAAAcEQyboDwD/\
    ERoMDQcA8uPkAA4G9AAA//sA8vL6AMnJ8wAdHwj9ztn/5KzOFqLv9gbRAAAV8gAAAAAA\
    AADxAAAA5wIQCfoEAgUJ+PLt6gDJwtgAAP76AAD//gAJCgUAIyUJANfe+vW10hGz7/YG\
    ygAAAMoAAADKAAAAzwAAAOMAAAD7BAAAAPD9+/gBCQoDAEVKJwAA+N8AAAECAM/R7vvT\
    3QHmt9MQtl/U7BAy9PRzjhwcfMcODtsAAAAUsdTUj+8EBMMCUIf69P39/9bs5uMAAAIE\
    AAABAwDn5/oA4eb+85fBGpjg7guw6QYGwRv4+DiC39+oQfDwULzR0bgV+vo+1QsL2AMA\
    AAAATDL88fz7/EofIyEI8u7qAMPA5wDz/gvlyt4KqQAAAMzPDAzX+wIC4jLz80tN7e1W\
    +gEB/5waGnWXGhq3AgAAAACNwCm17+3ux9rY5PoOExkARUojAA0G9xIAAADxAAAA9gAA\
    AP8A//8BAAAAAAAAAAAAAAAAAP//AQAAAAADAAAAAOfn5wA5JgHN+fLpQfX2AA/+/gIE\
    5+r38cTaC7AAAADsduPjP1zp6Zj5AgLweyEhcj7x8Tg58vJSE/z8zwMAAAAAAAAAAOsA\
    K+3D2w+oHwvmIPLt6yDc+Ta01d7zywAAAO1l5+dF/gEBAIEgIGvGDw/IohgYrk7t7SkN\
    /f30AQAAAAAAAAAAAAAAADMzMwEAAAANIRP0JuPvCgT8/gLpAAAA6QAAAAQAAAADAAAA\
    9s3NzfkzMzMGAAAACgAAAP6PhYUyRnnXfQAAAABJRU5ErkJggg==";
      }
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-cookies-loucypher.html');

    Help Tab

  523. Toggle Cookies

    Code Tab

    /*CODE*/
        this.toggle(event);
    

    Initialization Tab

    //
    //Set to false if you'd like to keep your last setting
    var alwaysOFF = true; 
    // pick yourself a preference
    this.pref = "network.cookie.cookieBehavior";
    // MANY thanks to nicholas for help with this attribute
    this.setAttribute("style", "padding-bottom: 0px !important; padding-left: 2px !important; padding-right: 2px !important; padding-top: 0px !important; ");
    // MANY thanks to ithinc for these attributes
    /*
    this.style.MozAppearance = "none";
    this.style.backgroundColor = "red";
    OR...
    this.setAttribute("style", "-moz-appearance: none; background-color: red;");
    */
    this.style.opacity = "0.85";
    this.onmouseover = function(evt)
    {
        this.style.opacity = "0.99";
    };
    this.onmouseout = function(evt)
    {
         this.style.opacity = "0.85";
    };
        this.setState = function(){
          var state=custombuttons.getPrefs(this.pref);
          if (state == 2){         // states of this pref are 1 or 2
            this.setAttribute("style", "background-color: none;");
            this.style.opacity = "0.85";
          }
          else{
            this.setAttribute("style", "-moz-appearance: none; background-color: #FF0000; border-width: 0px; -moz-border-radius: 4px; ");
          this.style.opacity = "0.99";
          }
        }
        this.toggle = function() 
    {
        var state=custombuttons.getPrefs(this.pref);
          if (state == 2)
          { 
    	custombuttons.setPrefs(this.pref,1);
            this.setAttribute("style", "-moz-appearance: none; background-color: #FF0000; border-width: 0px; -moz-border-radius: 4px; ");
          this.style.opacity = "0.99";
          }
          else
          {
    	custombuttons.setPrefs(this.pref,2);
            this.style.opacity = "0.85";
          }	
     }
    this.startState = function()
    {
        // states of this pref are 1 or 2
          var ststate=custombuttons.getPrefs(this.pref);
          if (ststate == 1)
          {         
    	custombuttons.setPrefs(this.pref,2);
          }
    }
    if (alwaysOFF == true)
    {
        this.startState();
    }
    // MANY thanks to SCClockDr for this bit
        this.PS = Components.classes['@mozilla.org/preferences-service;1']
                            .getService(Components.interfaces.nsIPrefBranch);
        // This is how you establish the observer
        this.ob={};
        this.ob.observe=this.setState.bind(this);
        this.PS.addObserver(this.pref,this.ob,false);
        // Establish the initial state
        this.setState();
    /*---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky, ithinc, nicholas, SCClockDr");
    this.setAttribute("version","20080325.5.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-cookies.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    

    Help Tab

    /* +++------------------- No help file --------------------+++  
    Extend the top line (on the "Help" tab when in edit mode) if 
    you cannot see your button's id number when you click on help
    in the context menu to make the help window wider.
    If still no good - temporarily comment out your this.tooltip
    line in the code or initialisation window. Put --> // in the
    front of the line.
    
  524. Toggle Cookies

    Code Tab

    this.toggleCookieBehavior();

    Initialization Tab

    var prefService = Components.classes["@mozilla.org/preferences-service;1"]
                        .getService(Components.interfaces.nsIPrefService);
    var prefDomain = "network.cookie.cookieBehavior";
    function pref() {
      var p = prefService.getIntPref(prefDomain);
      return p;
    }
    this.toggleCookieBehavior = function() {
      if(pref() == 2) {
        prefService.setIntPref(prefDomain, 1);
        this.image = "data:image/png;base64,\
    iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAEG0lEQVR4AQEQBO/7AAAA\
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACweQYQsHkGIAAAAAAAAAAAAAAAAAAAAAAA\
    AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAALB5Bg4EBw6B//78W////Q0CAwb6/vz5\
    BwIGDsnz8u+TjL8qrs3Nzf4AAAAAAAAAAAEAAAAAAAAAAAAAAACweQZXBgoRkyExSg0c\
    IysIDA0HAPLt6gAMDQcA6uPfAN7Y1e7s6ujJ2uHzbKjPIODNzc3+AwAAAAAAAAAAsHkG\
    WRIcMYg3TGwaGhwTBAb/5QDy6NMAyb3EACQg+wAMC/0ACwwOCQYHCCD99/A7Af72u/sI\
    JfIDMzMzAZdg7Q4CAwbEPFV4FAsG7wDy5s0AB//jAAcC7AAjIAEAAPzwAPLu7ADLxt4A\
    ODsfA/f3/xP9+fMRzOAMvwIAAAAJBQkRdSM0UQEJBfQA8ufSAMm/ywAA+ukAAPzxAAD9\
    9AAA/vcA//31AC8uBwD28ekACAf7CA0I/E4AAAAlBBEJ+gwDBQhLHicvBwD55AAOCe8A\
    RUQOAAD++gDy8vsACQoEANDS7/vg5v7y9vsH8gwE6xLz+gn1otM3vdUhgokEQyboCAD/\
    CBoMDQcA8uPkAA4G9AAA//sA8vL6AMnJ8wAdHwj9ztn/5KzOFqLv9gbTAAAV/e0ORjDm\
    FGBXIeeHZwIpF/H+AgUJ+PLt6gDJwtgAAP76AAD//gAJCgUAIyUJANnf+vW41BCt7/YG\
    vwAAANPfGXgr5RZkUSDoi2IM99POBAAAAPD9+/gBCQoDAEVKJwAA+N8AAAECAM7R7vvT\
    3AHmudQPtOPwC8EAAADk5RRhOfAMO24W8LFuDfbP083NzfQCUIf69P39/9bs5uMAAAIE\
    AAABAwDn5/oA3uT/9JLGLq/L/VXmAAAA4fMKMBzpElaYC/jYrBvrnL4AAAD1AAAAAAQA\
    AAAA8vDtldzUzzgZQzQQ8vQCAMjI8QDy+gzv3ByFR/gGHR8L+Nnd4RhxcwT98eAm43WO\
    AAAA783Nzf8AAAAAAwAAAADg+i7bNx7uPgEDBx8aGxADHR0FAOPh7ADU0dqP7BFOQ+8N\
    PUD6BRcnHeqZZQr529LNzc35AAAAAAAAAAACAAAAAM3Nzf/g5fFy1c3M2MzL4vjq7P8A\
    AwQG+Qf75+UJ+NzB+wQTGQn54MAU8bbMAAAA9wAAAAAAAAAAAAAAAAMAAAAAAAAAAOsA\
    K+3D2w+oHwvmIPLt6yDc+Ta01d7zyP8BBc74Bx8RHOqYeQj75eHNzc38AAAAAAAAAAAA\
    AAAAAQAAAAAAAAAAAAAAADMzMwEAAAANIRP0JuPvCgT8/gLqAAAA7QAAAP8AAAD5zc3N\
    +QAAAAAAAAAAAAAAAAAAAABrVopN4kjJMgAAAABJRU5ErkJggg==";
      } else {
        prefService.setIntPref(prefDomain, 2);
        this.image = "data:image/png;base64,\
    iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAEG0lEQVR4AQEQBO/7AAAA\
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACweQYQsHkGIAAAAAAAAAAAAAAAAAAAAAAA\
    AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAALB5Bg4EBw6B//78W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X2AA/+/gIE\
    5+r38cTaC7AAAADsduPjP1zp6Zj5AgLweyEhcj7x8Tg58vJSE/z8zwMAAAAAAAAAAOsA\
    K+3D2w+oHwvmIPLt6yDc+Ta01d7zywAAAO1l5+dF/gEBAIEgIGvGDw/IohgYrk7t7SkN\
    /f30AQAAAAAAAAAAAAAAADMzMwEAAAANIRP0JuPvCgT8/gLpAAAA6QAAAAQAAAADAAAA\
    9s3NzfkzMzMGAAAACgAAAP6PhYUyRnnXfQAAAABJRU5ErkJggg==";
      }
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-cookies.html-0');

    Help Tab

  525. Toggle Fire.fm-toolbar

    Code Tab

    /*Code*/
    const toolbar = document.getElementById("firefm-toolbar");
    toolbar.collapsed = !toolbar.collapsed;
    //===================================================================

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------*/
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    /*
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    */
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25, others');
    this.setAttribute('version','20080821.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-firefm-toolbar.html');
    this.setAttribute('dependency','Fire.fm');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    /*Help*/
    Left-click will toggle the Fire.fm toolbar
         https://addons.mozilla.org/en-US/firefox/addon/7684
  526. Toggle Firefox Startup State

    Code Tab

    switch(this.PS.getIntPref(this.pref)){
    case 3: this.PS.setIntPref(this.pref,0); break;
    case 0: this.PS.setIntPref(this.pref,3); break;
    } 

    Initialization Tab

    this.pref = 'browser.startup.page';
    this.setState = function() {
    var state;
    try {
    state = this.PS.getIntPref(this.pref);
    if(state == 3) {
    this.image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAACV0RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgTVggMjAwNId2rM8AAANSSURBVHicZZNZTFx1GMV//7sxM8wKlGFkLZSlJRQY2lKh7SS4kNgWG6O06oNxqa1GjXFJfKkPxiXBJsao1Rf1wVoTMOmDNamBEJuolVoFxUYLZZEOk7LNAszMneXO9UHTVnueT873nZNzhGma/B9CiApor8fi81DokktLXOt3N2QmPzl54s9buDcLCCHclDx3SNvasa++pabdarcVZY0c6XU9sh5aHiu3xIYGnhFfeP29M7cICGtrPc1HXtvWvau3ZYcPVRNoVhk1T0KPG8zPJ/l15Bqe5PK5Vw/Y3ujZ2zkIIP1zWSrC/9Rbnfd19e7c7mWLlOKBEsEudKIj85z/LojHTOGvsBJSCwLvfSv60pHp9usfiLKXXtx+5LHjbU0FPLHFSlud6z8+z42uYLdInB2PMTAn0BdX2Vee6T/+rP9RSRT2FDtbOw7U1hXQVSzRVudi6KclvhwOcSUYByDQWkjbZg/ReJaFYBi3z82Fv4zA1Sm9U8HX0LLJX9OqGhn8ZR5e+GyWP3IqhmFQORninYeqsDtUAKx5MrFoEqXKZDGrFf92Jb5b0cqriy0OW77Xo/H66SDnkzIGGdZWEjhcgv6RZTY4VCQBE6EESd0gHs8SzsoilqZS8bjtai5rkLJrjOoQKIDmUismVsLrBmd+WOLriTVkTULkTLrr7OR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eXq9Xqe8lkkkwmg2maXF5e0mg06Ha7CCFIp9NYlkUQBAwGA0zTZDKZvNlut99W19bWKsVicQ0gkUhwcnJCGIZEUUS/38e2bSRJAkDTNIIgACCKokXf999Sl5eXHV3X47quc3p6ymg0IgxDZrMZ6XSas7MzdF0HoNvtMp/Pmc1mCCGQZfkVNZVKKVEUIUkSd3d3uK6L4zgPe7vdptVqASCEoFQqATAej1EURVUNw/Ank8kIMDVNw7ZtisUiAGEY4nkeqVSKKIpYWFigUqlwfHyMoigikUi0Vd/3/+j1eqe5XG5LUZQHjwCKolCpVLi5uUHTNLLZLM1mk+l0SjweHy8tLR3Jh4eHl9Pp9GfP8zAMA13X6ff7XF1dAWBZFsVikWw2i+/7nJ+fEwQBhULhH8MwflXvs/5+OBy+I4SoybJMq9Wi0+mQyWTI5XJomkav16PT6TAYDMjlcsOVlZVD4N+HVz46Onrq+/5BEATbqVQKTdOIooj5fE4Yhg/J5PP5m/X19QPTNL8GxKMyeZ633mw2P7m9va0FQfAkDEPr/hZT0zR7hULheblc/hb48X/beA+j0+nsjkajp7IsP5FlOaZp2vXi4uJvqqr+BHgvkv8Da7Jiv9UVYgMAAAAASUVORK5CYII=';
    }
    } catch(ex) {
    state = this.PS.setIntPref(this.pref, 0);
    }
    }
    this.PS = Components.classes['@mozilla.org/preferences-service;1']
    .getService(Components.interfaces.nsIPrefBranch);
    this.ob = {};
    this.ob.observe = this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-session-restore.html');

    Help Tab

  527. Toggle Focus behavior for new tabs

    Code Tab

    /*CODE*/

    Initialization Tab

    /*Initialization Code*/
    /*初期設定コード(スタートアップで実行)*/
    // ---------------	 Event Detect 	------------------
    var that = this;
    this.handle = function(evt) {
    	try {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	switch(evt.button) {
    		case 0:
    			 this.loadInBackground = !gPrefService.getBoolPref("browser.tabs.loadInBackground", true);
    			 gPrefService.setBoolPref("browser.tabs.loadInBackground", this.loadInBackground);
    			 this.setState();
    			break;
    		case 1: // Middle Click
    			break;
    		case 2: // Right Click
    			this.showPopup(this);
    			break;
    		}
    	}catch(e) {alert(e);}
    	evt.preventDefault();
    	evt.stopPropagation();
    	return false;
    }
    this.buttonDisplay = function(){
    	if(this.loadInBackground){
    		this.tooltipText = "Foreground | ●Background";
    		this.setAttribute('style','border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;background-image:url(chrome://global/skin/toolbar/Lighten.png);');
    	}else{
    		this.tooltipText = "●Foreground | Background";
    		this.setAttribute('style','border-color: transparent;');
    	}
    	this.style.opacity = '0.65';
    }
    this.setState =function(){
            try{
    		this.loadInBackground = gPrefService.getBoolPref("browser.tabs.loadInBackground", true);
    	}catch(e){
    		setTimeout(function(){that.setState();},1000);
    	}
    	// gPrefService.setBoolPref("browser.tabs.loadBookmarksInBackground", this.loadInBackground);//ブックマークからも
    	// gPrefService.setBoolPref("browser.tabs.loadSearchInBackground", this.loadInBackground);//検索バーからも
    	// gPrefService.setBoolPref("browser.tabs.loadUrlInBackground", this.loadInBackground);//ロケーションバーからも
    	if(typeof TMP_openURL != 'undefined'){
    		// gPrefService.setBoolPref("extensions.tabmix.loadSearchInBackground", this.loadInBackground);//検索バーからも
    		// gPrefService.setBoolPref("extensions.tabmix.loadUrlInBackground", this.loadInBackground);//ロケーションバーからも
    	}
    	this.buttonDisplay();
    }
    // 監視を開始する
    this.addPrefListener = function(aObserver) {
    	try {
    		var pbi = Components.classes['@mozilla.org/preferences;1'].getService(Components.interfaces.nsIPrefBranchInternal);
    		pbi.addObserver(aObserver.domain, aObserver, false);
    	} catch(e) {}
    }
    // 監視を終了する
    this.removePrefListener = function(aObserver) {
    	try {
    		var pbi = Components.classes['@mozilla.org/preferences;1'].getService(Components.interfaces.nsIPrefBranchInternal);
    		pbi.removeObserver(aObserver.domain, aObserver);
    	} catch(e) {}
    }
    this.PrefListener = {
    	domain	: 'browser.tabs.loadInBackground',
    		//"XX"という名前の設定が変更された場合全てで処理を行う
    	 observe : function(aSubject, aTopic, aPrefstring) {
    		if (aTopic == 'nsPref:changed') {
    			// 設定が変更された時の処理
    			that.setState();
    		}
    	}
    }
    this.addPrefListener(this.PrefListener); // 登録処理
    this.showPopup = function(node) {
    	var popup = document.getElementById("custombuttons-contextpopup");
    	var x = node.boxObject.x;
    	var y = node.boxObject.y + node.boxObject.height;
    	document.popupNode = node;
    	popup.showPopup(node, x, y, "popup", null, null);
    }
    setTimeout(function(){that.setState();},1000);
    this.setAttribute("onclick", "this.handle(event);");
    this.setAttribute("onmouseout", "this.buttonDisplay();" );
    this.setAttribute("onmouseover", "if(!this.loadInBackground){this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');}this.style.opacity = '1';" );
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-focus-behavior-new-tabs.html');

    Help Tab

  528. Toggle Google Toolbar

    Code Tab

    /*Code*/
    const toolbar = document.getElementById("gtbToolbar");
    toolbar.collapsed = !toolbar.collapsed;

    Initialization Tab

        /*------------------ Custom Buttons² Attributes Block Start ------------------*/
        this.setAttribute('author','Deadman36g, jw25, others');
        this.setAttribute('version','20080313.00');
        this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-google-toolbar.html');
        this.setAttribute('dependency','null');
        this.setAttribute('status','Dev');
        this.setAttribute('public',true);
        this.setAttribute('help','0,null');
        // this.tooltipText += '';
        /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    undefined
  529. Toggle Images

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.prefBranch = Components.classes["@mozilla.org/preferences-service;1"].
      getService(Components.interfaces.nsIPrefBranch);
    this.pref = "permissions.default.image";
    this.setState = function() {
      var state = this.prefBranch.getIntPref(this.pref);
      if (state == 1 || state == 3) {
        this.tooltipText = "[enable] load images automatically";
        this.image = "data:image/png;base64," +
          "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAjlJRE" +
          "FUOMuFk09IFUEAxn8zu/t2fRQUuGlqPkkfERSFByuiUylERGKHLsEDuySUhy5G4UFIA0GP" +
          "HTtEeHrgIQoKCqpLHcqkNA8dTLHC//n/7e6b6bC7zydafZdhZthvft+3M+Lx0yH95sMk08" +
          "seqzlCKQpybGg+c5BrzfWCHWS+Hpqg4+pR9rkuQphowFci8tDkA48bvS/5m8yZ3z5uqUtr" +
          "7xVS1dWFjZX5NItzLhsqyeyST2N7Vu9EZq7nQEqTVEWKw8fqEIZEmpJXg2V0X2/4L5kZR0" +
          "7YCaxkAqHDE+aWFG6py/CdLg5UVBYxW4wtzFDfcRs/L0KDQMHw7AhTb8vxpqpYWIGlVcHl" +
          "u89RG/UY3yUgcGy4dGg3TaaBiuKYCtAahCXxflZxr/X0v7F7XtBUCRoNaEytFGiY/7aAZ4" +
          "TYbX2PqEunC9SGFEyMfabnVht+LmBl9D17VCYkEJH7w8533OweREqTdG0NR06cxJAG0rCQ" +
          "UmIZMsQWAkcKoqqQ5XttVLDB/qSHjAq1bQenZBdWwsEwDISIj9EolWd0eQ00KAXmuYYU/Q" +
          "Of+Dq5yFrOJ1Dw8csvZvR4+FE+bGBy9AeZs4BdQm3/AOCFETIXjxeuaGN7VmsN0kggDTsq" +
          "IBosBx0moCzpEwQethX9xlhxodPjI9uu7PT4COgLrK77ZLqeYZtw/lTNVoM46YP7nYXZpl" +
          "oAj6Rj8aSvRQBkYavBZqECRNi01rpgH2NveUzFk+JCldr+8mLsbNHaH3eb6dgJgbBQAAAA" +
          "AElFTkSuQmCC";
      } else {
        this.tooltipText = "[disable] load images automatically";
        this.image = "data:image/png;base64," +
          "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAdhJRE" +
          "FUOMuFk7/OKUEYxn+7Oz7/CskmQqGiIgoJidpVqJBtNG5BpyPZQqcQV+AiXIKoSCSKKTQk" +
          "/gSxu+YU39nFOb5znm5m3jzze5+ZV5tMJmo+n3M+n7nf7wA8Hg98hcNhqtUq7XZb44PEYr" +
          "GgXq9jmmawqZRCKRWYDYdDfpI4Ho+Ypkm/3yeTyQQH5/OZ0+mE53mcTieazab6RCYcxwEg" +
          "nU6Tz+fRdR3DMJjNZliW9V8y4R9Go1HC4XBQfDgcME2T0WhEKpV6IgvBbrej0Wjguu63gV" +
          "IKKSWXy4X9fs/1euV6vdLr9XAch+12C0AoFKJQKJBMJoOghY/19fXF4XCg1Wr9E9u2bYrF" +
          "4pPId5JSEovFME2T4XBILpcLijRNY71e0+l0cF2XzWaD53nfBn5Rt9vFtm0AstkspVIJTd" +
          "PQdR0hBLquB9iGYTwJEokEjuMQj8ffgopEIh/fXSnFfr8P2hKVSoXpdIqUkvv9jlKK1WoV" +
          "3OYXLpdLarUaoVCITqfzvMyyrOCLNptNpZTCMIw3TP/j+IrFYniehxDimcHrDEgp/0KXUq" +
          "KU4na7MRgMEEJQLpffDV4D/UmRSITxeBxQvxn8Gajfvy8f+22YXhevgX6cvN/Yr/oFeRDx" +
          "UhFcOqEAAAAASUVORK5CYII=";
      }
    }
    this.ob = {};
    this.ob.observe = this.setState.bind(this);
    this.prefBranch.addObserver(this.pref, this.ob, false);
    this.setState();
    this.leftclick = function(event) {
      switch(this.prefBranch.getIntPref(this.pref)) {
        case 2:
          this.prefBranch.setIntPref(this.pref, 1);
          break;
        default:
          this.prefBranch.setIntPref(this.pref, 2);
      }
    }
    this.midclick = function(event) {
      var element = content.document.getElementById("hideImg");
      if (element) {
        element.parentNode.removeChild(element);
      } else {
        var style = content.document.createElement("style");
        style.setAttribute("type", "text/css");
        style.setAttribute("id", "hideImg");
        style.innerHTML = "img, embed, object { visibility: hidden !important; } " +
          "html * { background-image: none !important; }";
        var head = content.document.getElementsByTagName("head")[0];
        head.appendChild(style);
      }
    }
    this.setAttribute("onclick", "custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-images.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.0.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  530. Toggle Java

    Code Tab

    switch(this.PS.getBoolPref(this.pref)){
    	case true: this.PS.setBoolPref(this.pref,0);break;
    	case false: this.PS.setBoolPref(this.pref,1);break;
    }

    Initialization Tab

    this.pref='security.enable_java';
    this.setState=function(){
     var state=this.PS.getBoolPref(this.pref);
     if (state==1){
      this.image=
    'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAABcMAAAXDABsIpz7QAAACB0RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgTVi7kSokAAACKUlEQVR4nHWSMYudRRSGn/c9Z+a7axBENAYsopgVdyUggq1skSoEbGy3SBdrf4eFCBaCbK9oIbKkvLGws0qxxVaB/ALZSPbu/eZY3Lt4FXybaeZ5Zt45o9c//Jyd3AA+Bb4CDoCVJIAuOJPjS0m/RWsvkHAk3oFvA78Cp6AD2SizO1p367j1A8Kntdlz+xqKvZuHBt4GvgPuYRORZCSROWe2vyLzZUSWM23Hu4gPHPkEuIi9m4evAj8A95yJI4loxNTp02LGPrHj+5wW72frt9walu4AH0v6OYG7wBEOwiayEW2i9Ua23q7W66XDP7a+OIZi1KD6mvXq6qhG3U3gRBKOwNnJPtGmBdk7kY1+I/dkq8ZYbARQY0bRmC8vTxK8r23vaI02TeRiItpEOlDYIHAUgKqoCuxAVfspcemMKTLJ3sg2kdmJSGyDVLtzDkFVMEpk75fGwjbOJLKzechY214hAK4Ful4ksIWd2NKEvJE4rhTxuxyfIX29Zd7aSl7+cw8hC9lTAueW9mUjx5+yfxI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IroOAhvrtzL5+/faPTgZU+3L+05+uF0Y6ANfAXsB/LWHjLuanazzOtXP1i6daR351u1vjyx72R9ycuLQAk8C6StE3BFRG5a47mDnY7oT780dh0aXf37+b9Sg09fPCHLqawD/SDbAXsK/hEYBxZl1yvvEkWJqA69oNW3rbJx+J/aNswcUQGEp5WB94B5egZh42XnF7x+fEnjdLeqZqqqInfzGuS1TXAGOA2M9WCAfwFy6bThwAwC4wAAAABJRU5ErkJggg==';
     }
    }
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/javascript-and-javatoggle-group.html');

    Help Tab

  531. Toggle JavaScript

    Code Tab

    switch(this.PS.getBoolPref(this.pref)){
    	case true: this.PS.setBoolPref(this.pref,0);break;
    	case false: this.PS.setBoolPref(this.pref,1);break;
    }

    Initialization Tab

    this.pref='javascript.enabled';
    this.setState=function(){
     var state=this.PS.getBoolPref(this.pref);
     if (state==1){
      this.image=
    'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAABcMAAAXDABsIpz7QAAACB0RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgTVi7kSokAAACUklEQVR4nG2TsWueVRjFf+c8z/u++ZIQQoqiCIIgIhRRUUrQboJTRJAK2sm1lA4KiquTOul/IEipYAfBdslQREgh1MUlHXS3WVrwk2jSfO99HL4vpWIP3OVefudcnnOvNk6f4yGdAjaAHWANQNLJ2dSRZxH3Mru7kR1I5EPwE8APwCYI2UjCFiCApYLfoG4BbwP7wAODU8D3oE1ZB3asKAJLR3ag8FCt5j7FmWrtesEbgj/zQbK0aRlnToHzYT/TLU0+d+SkjbNP+8nyrWrlw4O/VmVflLQN9VYC68C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y8tUz6QlYsmSe5SQe+lAxZ2F47yZmFEJJiaWg47fHOLyuPAYcH+PWJ2eZ7+w7Ne6cz1KO77KCyzAjueEyI2w2Y7rSG56+vMdbb3MXnJmd+/qB29KD3+xVJyNRxSX0LRghOSBJCkrN3f/18dLy3+fJQ2tn9oi8qB968sP+eZySdQXowSDNZRuoy9c1sw9xL7rE7KrIDW60lwdEBfmWqwWK1fkrwF3AReFtm50Pwu02yTSlcErp/LOstn/39q7LgvgF+darRX6zWU2ATOA08K3FF4geZuQOrSKcvX7t0az0WZ2vd9u7a5yem1z6q1p8E/gSWds4nQA6MSGq5pOeGSX+75oX1yW67NsCvTc11FqpH7gAuA08Dp4AMOATMAw8DdTf3dqHf++5vhWMDfPb2OS5WjwCMAV3gAv+tVZm1DLj+h8UT8+Mz3/yUG+GliWMs3HYYyJLtgcT/wSvAQ8AN1e59CknEfLFWir6Q5YtznuSw4MiE0L/xKvAoO2Ham8b1juykZ1kl7fVWQCNGQAY7aWwBx4EmcHOA/gEb272+WkeOLAAAAABJRU5ErkJggg==';
     }
    }
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/javascript-and-javatoggle-group.html');

    Help Tab

  532. toggle on tab close focus left/right

    Code Tab

    /*
        This button requires Tab Mix Plus: https://addons.mozilla.org/en-US/firefox/addon/1122
        The button toggles the option "When closing current tab, focus:" between "left tab" and "right tab".
        Rawny ^^
    */
    

    Initialization Tab

    // ***** IMAGES ***** //
    var RightImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQ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jUhAAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABqSURBVChTXY9RAoAgCEMpy8yohPvflSBJq32xxxAE+QncE3nxgBSdNIBLJR04AWEmIk6IlYBswTQfTkDSGnLO5nHXzBfEwiBjmGzGInEkBXSaBve2llWiW6z/vqP6fpj7Bqjc/Z7Ql+p3L0FOh/4bOvGhAAAAAElFTkSuQmCC";
    var LeftImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAASFo2cHFvV6ENXKkPXKYSZpwxaaAyd51SeeMPeusKhpxwiOUrj+8viOEwi4qKmJmXqauot7i4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5XjUhAAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABoSURBVChTXc9LEoAgDANQFAVE/KT3v2tthE3JiryhTAk6JYwOjMMApOIAuTmw7oC9FQEgovbG3+89MqcB8mXQ7lprPIoGedMEWBMvcGCLq41Il+VhwEe7FBWLErq4xSh+dcE7fY7TPR//Tof+bPAWzQAAAABJRU5ErkJggg==";
    var DefaultImg = "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMnR0RjM1NPPtr+/LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALq1sjvLysTAxsbAGQAAAAAAAAAAAAAAAAAAAACnsK8UpK2sy6Cqqr6msLEaAAAAAAAAAAAAAAAAwb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AAAAAAAAAAAAAAAAAAAAAAAAAAAAODd4hTa1tnIzsfK59rQ1Q4AAAAAAAAA/wAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4+Di7NnU1gwAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAx+OcQcODnEHAA5xB4AOcQeADnEHAA5xBgAGcQQAAnEEAAJxBAACcQeAHnEH4AZxB+BecQfw7nEH8LZxB/nOcQQ==";
    // ***** VARS ***** //
    var prefstring = "extensions.tabmix.focusTab";
    // ***** FUNCTIONS ***** //
    function GetPrefs() {
        try {
            return(custombuttons.getPrefs(prefstring));
        }
        catch(e) {}
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt)
    {
        if (GetPrefs() == 1) {
            custombuttons.setPrefs(prefstring,5);
            this.image = RightImg;
        }
        else {
            custombuttons.setPrefs(prefstring,1);
            this.image = LeftImg;
        }
    }
    // ***** INITIALISATION ***** //
    switch(GetPrefs()) {
      case 1: this.image = LeftImg; break;
      case 5: this.image = RightImg; break;
      default: this.image = DefaultImg;
    }
    this.setAttribute("onclick","custombuttons.gQuot.mHandler(event, this)");
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Rawny');
    this.setAttribute('version','3');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-tab-close-focus-leftright-requires-tab-mix-plus.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete')
    this.setAttribute('public',true);

    Help Tab

    Left click the button to toggle the option "When closing current tab, focus:" between "left tab" and "right tab".
  533. Toggle Page Style

    Code Tab

    /*Code*/
    var viewStyle = getMarkupDocumentViewer().authorStyleDisabled;
    if (viewStyle) {
      setStyleDisabled(false);
    } else {
      setStyleDisabled(true);
    }

    Initialization Tab

    /*Initialization code*/
    this.setAttribute("author", "Morat");
    this.setAttribute("version", "1.0");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-page-style.html');
    this.setAttribute("dependency", "FF 3.0.*, CB2 3.0.*");
    this.setAttribute("status", "Complete");
    this.setAttribute("public", true);

    Help Tab

  534. Toggle pop-up blocker

    Code Tab

    /*CODE*/

    Initialization Tab

    var popups_enabled_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAFTSvDTPKCTD6G1OtIkiVFUjLFVfSEFHzJWnNLXfRKHL0VFesUmuwZniwUnXNUXbwHq5ONLRrabNvW4nRUYjxXZnxaZjQZ6fza7f1bsmMb8r4lbXtkMeNrsuzsNXPocny2djX0dfs6e/U5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOU9i9gAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACQSURBVChTXY7tEoIgEEVXK7+IdFEUqEQM3v8RaxUdx86vvWd2dy4MvZRVVZZ5nmVpml6hf2rVS8ZYUVyIBNQ0aa3IyYYsS0CHExxeZ/Eg4d3KPJvRh2XDbxjchbWkXIu7CCNNTiAKF09IoIn5EBjzJvybcvuh74FO1NLDCkNhYRNHOQ7V0HV1zTm/r9zg+8cP3qEopt9oA4kAAAAASUVORK5CYII=";
    var popups_disabled_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAFTSvDTPKCTD6G1OtIkiVFUjLFVfSEFHzJWnNLXfRKHL0VFesUmuwZniwUnXNUXbwW4nRUYjxXZnxaZjQZ6fza7f1b8r43RcU3TUz4wQG5jEL+D5E6FEs3k5N5W9P5HFu3pFwlbXtocny3pOP3piq1LaxzbzJ2djX5ejw+Pv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5u19KgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACbSURBVChTXYxrE4IgEEXRHj6ITBQCV8NSCff//78iphztfNi5c+buJXXFeZ5nWZIcj3Ec70l1laLilNI03XkiIoZBSuEdv3hLIyJxAyOPrTgHMfUO0fWTj6FhWzDOGWh/Aq0GY0DbRaDtNHRuXgkNSvud7waOGm6qUcuLBbijbRoVGgJx7kcfn/pzg1jDSF6XZVEwxk6BA3n98QZyPiwBZ50VgAAAAABJRU5ErkJggg==";
    var preF = 'dom.disable_open_during_load';
    var on = false;
    var off = true;
    this.pref = preF;
    this.setState = function(){
      var state = this.PS.getBoolPref(this.pref);
      if (state == off) {
        this.checkedval = false;
        this.image = popups_disabled_img;
        this.tooltipText = "Popups are currently disabled, click to enable them.";
      } else {
        this.checkedval = true;
        this.image = popups_enabled_img;
        this.tooltipText = "Popups are currently enabled, click to disable them.";
      }
    }
    // TOGGLE FUNCTION FOR CHECK/UNCHECK
    this.leftclick = function(evt){
      var prefValue = custombuttons.getPrefs(preF);
      if (prefValue == off) { 
        custombuttons.setPrefs(preF,on); 
        this.checkedval = false; 
        this.image = popups_enabled_img;
        this.tooltipText = "Popups are currently enabled, click to disable them.";
      }
      else { 
        custombuttons.setPrefs(preF,off); 
        this.checkedval = true; 
        this.image = popups_disabled_img;
        this.tooltipText = "Popups are currently disabled, click to enable them.";
      }
    }
    this.setAttribute('onclick', 'gQuot( event, this )'); // Calls the Global MouseClick handler gQuot
    // OBSERVES STATE OF PREFERENCE
    this.PS = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
    this.ob = {};
    this.ob.observe = this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute('preference',preF);
    // BUTTON ATTRIBUTES
    this.setAttribute("author", 'rawny, nicholas');							                       // Stores Author.
    this.setAttribute("version", '2 (2009-02-22)');                                                 	                       // Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-pop-blocker.html');      // Stores Homepage.
    this.setAttribute("dependency", 'FF 2.0.*,CB 2.0.*');						                       // Stores Dependency.
    this.setAttribute("status", 'Complete');							                       // Stores Devstatus.
    this.setAttribute("public", true);								                       // Stores Public.

    Help Tab

  535. Toggle pop-up blocker

    Code Tab

    /*CODE*/

    Initialization Tab

    var popups_enabled_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAaZJREFUOMulkrFrU2EUxX/3fd9LTYrF0P4RurgrWiQ6hGCplnZwqkUhgg4iujno4O4QhDdJ/wFFFBEUlBYsKqg46SDo0E0MsYQ0Ly/vOLw09YHFB57pHD7uuee79xrAg4eP1IoiiuBKs8nC2Xnb0R6gFUX8WHlcyKAVzeW03yEfl6yQwan7eR3wnxgnGAxiJMAME8jAJDBDgAkYhbx67YYAZo8f2zXY3u4X7npraROAhdtR3sAQIkuRxcmayiB7yLD/8PURu5n/QlF8/lYacwOo1Rv6V9GHufd0el1ATJUn+bL4iXPLK/x1d7V6Q5ebF8Z68et5zImgJHCgBJQYJ57NYntd4YunTwCYuTtDO4jxkymukmKh0MAYdgOCLYfV6g0tv97IFa8ePTLmr06uYRURVof4qSFBSaR9I/nlSNouG+KZl89zBuW373YNeuuYSzEvggkR7Ms2ZaHASx4gPHQwZ3D6Dz29eoefaRslRtrPRqbYSAeGwzoewIflPae/efE7lXsHGHZHd+GFEoOeU/9St2pFVgjwpr5BPBHLHDgFnV5zqwrwG4A3nkwtds4yAAAAAElFTkSuQmCC";
    var popups_disabled_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAapJREFUOMulks9LlGEQxz+Tr4EHUWuXdV3oUPijS2eVFFw6vCwuleBNE1HaQx4iCjx4sFt/wF7eU4iingx/sAiF3crykMfAS7zx8gou6GLUlsp0eNZX3raFF/yeZp5n5jsz3xkBWHmzqnnHIQqmcjmGHt6Xc98CyDsOxfH1SAR5JxvyrXNjd1giEdx7HfavcEkEHZyc/EEVEEEUVEBUQQQFRIFKk0+fvVCA/r67FwTl8u/IVWeHPQCGXjphAkFRTBemHVNUBcyHQeOd5xVrJjxCVHz9drVag0eTj/8bvHS8y+nOPqNpO3iLxeKcJhLMX8gSRtrO6JPcBAC9U2MkBq7h7x2xPW122P1qnGR7M/6Ci9S6wneFjcA+HOmkpbuL4ton9EeZ+M0m/MXvjNoZJG1ndOzDx1DyXG9PFeGyfiHWcR0OSvjLJjnQ4MH7t6Hghs87VQQ6vw3FEhSPAdjaLEhAUH+7KxQ8+I9/NNBG/FYz/qILQPJGHZ57pikQC8Cqb6i5slJ/C60VwVIV0T33TJOAB2oB2NlsTYK5X4q/4JqZNwsApEA8c18//wKvyI/xJJkPOAAAAABJRU5ErkJggg==";
    var preF = 'dom.disable_open_during_load';
    var on = false;
    var off = true;
    this.pref = preF;
    this.setState = function(){
      var state = this.PS.getBoolPref(this.pref);
      if (state == off) {
        this.checkedval = false;
        this.image = popups_disabled_img;
        this.tooltipText = "Popups are currently disabled, click to enable them.";
      } else {
        this.checkedval = true;
        this.image = popups_enabled_img;
        this.tooltipText = "Popups are currently enabled, click to disable them.";
      }
    }
    // TOGGLE FUNCTION FOR CHECK/UNCHECK
    this.leftclick = function(evt){
      var prefValue = custombuttons.getPrefs(preF);
      if (prefValue == off) { 
        custombuttons.setPrefs(preF,on); 
        this.checkedval = false; 
        this.image = popups_enabled_img;
        this.tooltipText = "Popups are currently enabled, click to disable them.";
      }
      else { 
        custombuttons.setPrefs(preF,off); 
        this.checkedval = true; 
        this.image = popups_disabled_img;
        this.tooltipText = "Popups are currently disabled, click to enable them.";
      }
    }
    this.setAttribute('onclick', 'gQuot( event, this )'); // Calls the Global MouseClick handler gQuot
    // OBSERVES STATE OF PREFERENCE
    this.PS = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
    this.ob = {};
    this.ob.observe = this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    this.setAttribute('preference',preF);
    // BUTTON ATTRIBUTES
    this.setAttribute("author", 'rawny, nicholas');							                       // Stores Author.
    this.setAttribute("version", '2 (2009-02-22)');                                                 	                       // Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-pop-blocker.html');      // Stores Homepage.
    this.setAttribute("dependency", 'FF 2.0.*,CB 2.0.*');						                       // Stores Dependency.
    this.setAttribute("status", 'Complete');							                       // Stores Devstatus.
    this.setAttribute("public", true);								                       // Stores Public.

    Help Tab

  536. Toggle Roboform Toolbar

    Code Tab

    /*Code*/
    const toolbar = document.getElementById("roboform-bar");
    toolbar.collapsed = !toolbar.collapsed;

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute('author','nicholas, others');
    this.setAttribute('version','20080521.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-roboform-toolbar.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);

    Help Tab

    null
  537. Toggle Sidebar direction

    Code Tab

    /*CODE*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('...')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      var sidebar = document.getElementById('browser');
      var sb=document.getElementById('sidebar-box');
      if(sb.boxObject.x !=0) {
        sidebar.setAttribute("style", "-moz-box-direction: normal;");
      } else {
        sidebar.setAttribute("style", "-moz-box-direction: reverse;");
      }
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons Attributes Block Start ------------------*/
    this.setAttribute('author','_pi (Dirk Schmeckthal)');
    this.setAttribute('version','Version 20090226.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-sidebar.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    Help not developed for
    <label> button
    custombuttons-button<id>
  538. Toggle Tektek Toolbar

    Code Tab

    var toolbar = document.getElementById("myqnaXULToolbar");
    toolbar.collapsed = !toolbar.collapsed;

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-tektek-toolbar.html');

    Help Tab

  539. Toggle Toolbar

    Code Tab

    /*Code*/
    const toolbar = document.getElementById("PersonalToolbar");
    toolbar.collapsed = !toolbar.collapsed;

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert( this.CbStr.sButtonCompatabilityAlert );
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------*/
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25, others');
    this.setAttribute('version','20080320.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-bookmarks-toolbar.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    /*Help*/
    Left-click to toggle the Personal/Bookmarks toolbar
    Can be edited to toggle any toolbar
  540. Toggle Wrap

    Code Tab

    var thisDoc = content.document;
    function wrap(n) {
      var u, r, c, x;
      if(n.nodeType == 3) {
        u = n.data.search(/\S{30}/);
        if(u >= 0) {
          r = n.splitText(u + 30);
          n.parentNode.insertBefore(thisDoc.createElement('WBR'), r);
        }
      } else if(n.tagName != 'STYLE' && n.tagName != 'SCRIPT' && n.tagName != 'PRE') {
        for (c = 0; x = n.childNodes[c]; ++c) {
          wrap(x);
        }
      }
    }
    function unwrap() {
      if(!wbr.length) return;
      for(var i = 0; i < wbr.length; i++) {
        wbr[i].parentNode.removeChild(wbr[i]);
      }
      unwrap();
    }
    var wbr = thisDoc.getElementsByTagName('wbr');
    if(wbr.length) {
      unwrap();
      thisDoc.body.normalize();
    } else {
      wrap(thisDoc.body);
      var thisE = thisDoc.body;
      var p = thisE.parentNode;
      var n = thisE.nextSibling;
      p.removeChild(thisE);
      p.insertBefore(thisE, n);
    }
    

    Initialization Tab

    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','20090226.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-wrap-long-lines.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  541. Toggle Zoom

    Code Tab

    /*CODE*/

    Initialization Tab

    /*Initialization Code*/
    var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
    var ff2Icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAERElEQVR42mL8//8/AzpgZGR0AVIOQGwLxLpQ4ctAfBiIDwD17GEgEgAEEAPIAhgGAm0gPgXE/wlgkBptZL24MEAAMcJ8AHQ1yPBLQMykpKz2wdrW+aW1ncsbA0OLd3/+/f996sQR7kMHdoqePn5A5umT+2JAdf+AWA+o/yo+DwAEENgCZMO9fIIfpWeX3Dcwsvj47z/Dn3//GP78+cvw6+9fht8g+vjR/TzzZnbonjy6S48YSwACCGYByMumnt5BDzv7Zt3gFxD+9erOLalPL54Lffv0mevPrz//mbm434jrWx9nZOX68uLFM6amyjjHMyf2giw5DTTDDJcFAAHEAo1QU0VgsKRnl94HGv4T5PLHF88Z//7xk+H3z98Mf4FO//Pnj8Tbh4/E1QOTF3BycrP4h6VfevTgl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Zob/339+/cT64/tXlju3LkpAzTkMTEkYJQQIAAQQyIIDQFx95uRBuWNH917VN7J/8wMYxu+fPdB+++Su9l9g2P3995fhL9BbDNx8t5kERR78+PaF5cG9GwJALA017wAuHwAEEEpGM7V0uVRYNekINw/fn9e3rsh9fvlE+t/fP4y/f/9mYhQQfPKbhe3Tzx/fmB/cu65x5MAWzft3rnKAMhoQm2Er40AAIIAwigpDU/sr3oGJl5VVdT+BUgooIn/9/MkENJjlBzBir10+qXX+zCG9B3evMSAl0SO4LAAIIKyFnZi4zGsVdf1HKhp6r2RkVT79AgbZg3vXhO7eviIOdL3i+7evuJHMAtnkDMQvsFkAEEDkFtd3gfgvEv8eEMthqwYAAghrGQ4EoPKpBYgPAvE7KD4IFXOBmhEIxD+RLHkIxCroFgAEEAMxlQaSxejAA4i/IVnyHIi1kC0ACCBKLQABeyD+jGTJWyA2hukBCCBqWAAClkD8AcmSCTA9AAFELQtAwACIQaXrUiBmhukBCCBqWgACiiDDkeMAIIAYidRINgAIMAAB5yj1psF/swAAAABJRU5ErkJggg==';
    if(prefs.getBoolPref("browser.zoom.full"))
      this.image = ff3Icon;
    else
      this.image = ff2Icon;
    this.onLeftClick = function()
    {
            if(prefs.getBoolPref("browser.zoom.full"))
      {  
        prefs.setBoolPref("browser.zoom.full", false);
        this.image = ff2Icon;
      }
      else
      {
        prefs.setBoolPref("browser.zoom.full", true);
        this.image = ff3Icon;
      }
    }
    this.execute = function(evt)
    {
      switch(evt.button) 
      {
        case 0:
          this.onLeftClick();
          break;
      }
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.tooltipText = 'Toggles between FF3 and <= FF2 zoom behaviour';
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-zoom-toggles-between-ff3-and-ff2-zoom-behaviour.html');

    Help Tab

    null
  542. Toggle²

    Code Tab

    /*Code*/
    /*Start Code Statments */
    this.doLeft(event);
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    var Cb = custombuttons;
    this.info = '\n\nBBCode: [toggle=prompt]Clipboard[/toggle]';
    this.ss = [
      { label: 'BBCode', open: '[toggle=%a]', open1: '[toggle=%a]%c', close: '[/toggle]' }];
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.smidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.amidclick = function(evt)
    {};
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
    	index 		: 0,
    	listo 		: '',
    	liste 		: '',
    	listc		: '',
    	theBox		: {},
    	startPos 	: 0,
    	endPos 		: 0,
    	oPosition 	: 0,
    	oHeight 	: 0,
    	text		: '',
    	nHeight		: 0,
    	Highlight	: '',
    	eBlock		: '',
    	cBoard		: '',
    	n		: '',
    	initMeth	: function( oBtn ){
    				this.index	= 0;
    				this.listo 	= oBtn.ss[this.index].open;
    				this.liste 	= oBtn.ss[this.index].open1;
    				this.listc	= oBtn.ss[this.index].close;
    				this.theBox	= document.commandDispatcher.focusedElement;
    				if ( this.theBox ) {
    					this.startPos 	= this.theBox.selectionStart;
    					this.endPos 	= this.theBox.selectionEnd;
    					this.oPosition 	= this.theBox.scrollTop;
    					this.oHeight 	= this.theBox.scrollHeight;
    					this.text	= this.theBox.value.substring(0,this.startPos);
    					this.nHeight	= this.theBox.scrollHeight - this.oHeight;
    					this.Highlight	= this.theBox.value.substring(this.startPos, this.endPos);
    					this.eBlock	= this.theBox.value.substring(this.endPos, this.theBox.value.length);
    					this.cBoard	= gClipboard.read();
    					this.n		= '';
    					return true;
    				} // End if ( this.theBox )
    				return false;
    			} // End initMeth
    };
    this.doLeft = function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	if (this.pref === 0){
    		if (!this.Select()) return;
    	} // End if (pref === 0)
    	var x = this.intro;
    	if (!x.Highlight) {	// THEBOX CONTAINS NOTHING HIGHLITED.
    		switch(this.pref){
    		case 1:
    			x.text += x.listc + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=0;
    			this.checked=false;
    			break;
    		case 0:
    			x.n += x.listo.replace(/%a/,this.input.value);
    			x.text += x.n + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.n.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=1;
    			this.checked=true;
    			break;
    		}
    	} else {	// THEBOX CONTAINS SOMETHING HIGHLITED.
    		x.n = x.liste.replace(/%a/,this.input.value).replace(/%c/,x.Highlight)
    		x.n += x.listc;
    		var nLen = x.n.length
    		x.text += x.n + x.eBlock;
    		x.theBox.value = x.text;
    		x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos + nLen;
    		x.theBox.scrollTop = x.oPosition + x.nHeight;
    	}
    }; // End this.doLeft*/
    this.doMid= function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro
    	if (!this.Select()) return;
    	if (!x.cBoard) {
    		alert('Middle-click expects the Clipboard to contain text to Hide.\n\n'+this.info );
    		return;
    	}
    	x.n += x.liste.replace(/%a/,this.input.value).replace(/%c/,x.cBoard) + x.listc;
    	var nLen = x.n.length;
    	x.text += x.n;
    	x.theBox.value = x.text + x.eBlock;
    	x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    	x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    this.Select = function (){
    	var result = this.prompts.prompt(null, this.sTitle, this.sMsg, this.input, null, this.check);
    	var x = this.input.value.replace(/\ /g,'');	// Remove spaces, then Punctuation
    	this.input.value = x.replace(/[\n\t\.\,\/\?\<\>\;\:\'\"\[\]\{\}\`\~\!\@\#\$\%\^\&\*\(\)\-\_\=\+\|\\]/g,'')
    	return result;
    };
    /*----------------------- Button Code Block End -------------------------*/
    this.prompts	= Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
    			.getService(Components.interfaces.nsIPromptService);
    this.input	= {value: 'ChangeLog'};
    this.check	= {value: false };
    this.sTitle	= 'Toggle Prompt';
    this.sMsg	= 'Enter the Toggle Prompt. - no spaces or punctuation';
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090205.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-toggle2-button.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.tooltipText = Cb.getNumber( this.id ) + ':BBCode ' + this.label + " \n L=Normal \n M=Clipboard \n R=Context";
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    *******************************************************	
     L = IF text is highlighted:
    	 BBCode: [toggle=Prompt]Highlighted[/toggle]
    	 OR nothing highlighted
    		 First click = [toggle=Prompt]	
    		 Second click = [/toggle] or </p>
     M =
    	 BBCode: [toggle=Prompt]Clipboard[/toggle]
    		 Any Highlighted text will be REPLACED	
     R = Context Menu
  543. Toogle Colors

    Code Tab

    switch(this.PS.getBoolPref(this.pref)){
    	case true: this.PS.setBoolPref(this.pref,0);break;
    	case false: this.PS.setBoolPref(this.pref,1);break;
    }

    Initialization Tab

    this.pref='browser.display.use_document_colors';
    this.setState=function(){
     var state=this.PS.getBoolPref(this.pref);
     if (state==1){
      this.image=
    'data:image/gif;base64,R0lGODlhEAAQAPcAAAQCBISCBAQC/PwCBPz+BCAAAAAAAAAAAAAaAQAAABUAAAAAABEAGQAAAAAAAAAAAAAAEQIAAAAAAAAAAAAVcQMAOQAA1wAAWkQVhL0AABIAAAAAAOkNiOUAFoEA2nwAWgANFQAAAAEAAAAAAFYH7AAYAQAQAAB7AEw8NbwEORKF1wADWmUXWAAAQAAAMwAAAGwB7r0AAxIAIQAAABgZSO4AQJEAM3wAAIgR278AGhIA1wAAWjcBPLYA9EsAEgAAAGYHhAAAAAAAAAAAAKAI7r8AAxIAIQAAAHQJ7r8AAxIAIQAAAHIghHKIAE4AAAAAAPIAAP8AAP8AAP8AAAC87AC+AQASswAAAVg0BLW+AEsSAAAAAKQG5PDEBBLYAABaAA5AcQBB1QAzNgAAfqDsAL8BABIAAAAAAHSzAb8BABIAAAAAAKT0AfC+ABISAAAAAAADAADWAADYAABaAAxAcQBB1aczNgAAfnwFBb0AABIAAAAAANLuYOYDv4EhEnwAANhIsWJAwhUz2AAAWkqEe+MAw4EA2HwAWoAAAPsAAE8BAAAAANgBAGIAAAECAAAAAGqgBwAAAAAAAAAAALgGq7wxNxIAkgAAfACUAAC+AAASAAAAADiFAPkrABKDAAB8ABgAAO4AAJEAAHwAAHAAAAUAAJIAAHwAAP8AAP8AAP8AAP8AAG0pDgW3AJKTAHx8AE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NjY6Ojo+Pj5CQkJGRkZKSkpOTk5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zMzM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///yH5BAEAAAEALAAAAAAQABAABwhXAAEIHEiwoEAmCBMK5MCw4cGECBc2ZPgQosSJFRUCmEgRAMSIGzlmBMmRg8GTKFMSFMeypcA4MGMKbOkSQEyZAGiyfHkzzkydPG/+pBkUp05xRWGqPBkQADs=';
     }
    }
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','m00k00');
    this.setAttribute('version','20072121.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toogle-colors.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  544. Toogle Pipelining

    Code Tab

    switch(this.PS.getBoolPref(this.pref)){
    	case true: this.PS.setBoolPref(this.pref,0);break;
    	case false: this.PS.setBoolPref(this.pref,1);break;
    }

    Initialization Tab

    this.pref='network.http.pipelining';
    this.setState=function(){
     var state=this.PS.getBoolPref(this.pref);
     if (state==1){
      this.image=
    'data:image/gif;base64,R0lGODlhEAAQAPcAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBmAABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNmZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZmzGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZAJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8Amf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+ZzP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP////i/JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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mzP9m//+ZAP+ZM/+ZZv+Zmf+ZzP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP////i/JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAANgALAAAAAAQABAAAAg3ALEJHEiwoMGDCBMqTAhg4UAAEB1CBMBqosWLFSmy2sixI0eIGS9inCgxokNsDU+qXMmyJcGAAAA7';
     }
    }
    this.PS=
     Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.pref,this.ob,false);
    this.setState();
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','m00k00');
    this.setAttribute('version','20072121.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toggle-pipelining.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';

    Help Tab

  545. ToolBar IconSize

    Code Tab

    /*Code*/
    this.shrinkTbs();
    

    Initialization Tab

    /*Initialization code*/
    this.shrinkTbs = function()
    {
      let cBarList = "";
      setTimeout(function(){
      var tb = document.getElementsByTagName("toolbar");
      for (var i in tb){
        let toolBar = "";
        if (typeof tb[i] == "object") {
          toolBar = document.getElementById(tb[i].id);
          if (tb[i].id != "navigation-toolbar" && tb[i].id != "nav-bar") toolBar.setAttribute("iconsize","small");
          if (tb[i].id == "navigation-toolbar" || tb[i].id == "nav-bar") toolBar.setAttribute("iconsize","large");
          let sNewSet = toolBar.getAttribute( "currentset");
          toolBar.setAttribute( "currentset", sNewSet )
          document.persist(toolBar.id, "currentset");
          cBarList+= (typeof tb[i].id == 'undefined')? '' : tb[i].id + '\n' ;
          }
        }
      },2000);
    }
    this.shrinkTbs();
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toolbar-iconsize-support.html');

    Help Tab

    Help%20not%20developed%20for%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.%0A
  546. ToolBar Manipulator

    Code Tab

    /*CODE*/
    // Default Image
    //data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFQ4w/ktcfAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAHZJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IRMxSuHgwf0HpGkAggHR4Jqa6nr6NJDEqoEFi1haGoOJCYgxezZxGmbNQpAYgLR4OHLo4NAIVvyAZd/eXU7ObsQoBaoEhRIwxTKAUxWRNgAAmvsop+eVqKQAAAAASUVORK5CYII=
    /*
       New ToolBar Manipulator Button
         SCClockDr
           Joined: 25 Dec 2006  http://custombuttons.phpbbnow.com/
           Location: SC UpState
         Authored by m435tr0d and modified by me to ease user implementation.
       left click ---------> Cycle through the ToolBar list ++
       ctrl+left click ----> Display Selection Dialog   [Allows to select a specific toolbar]
                  [The last element allows to copy the]
                  [available toolbars to the clipboard.]
       middle click -------> Toggle the list on/off
       right click --------> Reverse through the ToolBar list --
       ctrl+right click ---> Go Home  --- [ When riding the bars ]
       shift click --------> Custom Button Menu
      NOTE  I: Due to the manner of button Initialization within the Extension:
      1. If installed to ride the bars, the button will start up on the toolbar it was first placed on.
      2. If the button is moved from a toolbar not in the list to a toolbar in the list. The first
         click will appear to do nothing. (A button move does not trigger an extension driven initialization.
         So it is implemented within the button and requires one click.
      NOTE II: The number of toolbars in the list is only limited by system resources.
      In the current configuration the image rotation will count nine (9) toolbars, then
      a default image is displayed until the toolbar displayed is < 10.
            NOTE III: An Example of the Duplicate toolbar operation:
                 Tool Bar Array      Non-Resident       Resident           Resident
                    Structure        Behavior       Behavior           Behavior
               this.abars=new Array;           L Click            R Click
         this.abars.push('nav-bar');    Show nav-bar      Show nav-bar       Show nav-bar
         this.abars.push('diff-bar');    Show diff-bar     Show diff-bar      Show diff-bar
         this.abars.push('sweet-bar');  Show sweet-bar    Show sweet-bar         Skip
         this.abars.push('sweet-bar');  Hide sweet-bar        Skip           Show sweet-bar
    Version History:
    02/08/2007: - Ver. 0.0.0001b First beta release of the Toolbar Manipulator. It will:
      1. Toggle a single Toolbar.
      2. Move Forward & Reverse through a list of Toolbars. L | R click.
      3. Toggle the list of Toolbars on / off. M click.
    02/13/2007: - Ver. 0.0.0002b Second Beta release of the Toolbar Manipulator.
      1. Complete re-write to resolve bug causing multiple instances of this button
         to interact adversly with each other. Now seperate instances are autonomous.
    02/14/2007: - Ver. 20070214.00 Third Beta release of the Toolbar Manipulator.
      1. Upgrade - Tool Bar names may now be repeated within the array. Allowing a high
         priority tool bar to appear more than once in the rotation. - Example: nav_bar, bookmark_bar, nav_bar, etc.
    02/16/2007: - Ver. 20070216.05 Fourth Beta release of the Toolbar Manipulator.
      1. Fixed bug which manifests when a toolbar is collapsed manually. The rotation stops
         and the image increment stops.
      2. Upgrade - The Manipilator Now will toggle the bars whilre riding the bars.
         Example: Middle click causes all the bars to collapse and return. the bar where the
            the button resides stay's up. This behavior flows with the button.
      3. Upgrade - Ctrl+Right click action added. When the button is placed on a bar within
         the list, FF rembers this placement, and will prevent moving the button if it resides
         on a different tool bar. This action puts the button on the bar where it was placed.
        * In addition TBM stores a pointer in prefs so it remembers the placement of the button.
      4. Upgrade - Smoother transition from non-resident placement and resident placement.
         The rotation continues from where it was.
    02/16/2007: - Ver. 20070216.06 Bug fix - Removed offending local code that was not for publish.
    02/22/2007: - Ver. 20070222.02 Bug fix
      1. Corrected issue which prevented toggle with a single toolbar in the list.
      2. Fixed un-defined function call in the "this.gofwd" & "this.gorev" functions.
      3. Fixed issue that throws an error when a listed toolbar is missing from the browser.
         The button now removes the offending entry at initialization.
         (The Button issues an Error alert to check it's spelling in abars.)
    02/23/2007: - Ver. 20070223.00 Improve Error message clarity.
    02/25/2007: - Ver. 20070225.00 New features & additions.
      1. Removed Init code that now lets the browser determine the toolbar state
         at startup.
      2. Added feature:  TBM now will toggle the current tool bar to off, if it encounters a
         duplicate tool bar name in a paired fashion. (See NOTE III above)
      3. When resident on a toolbar within the list, and TBM encounters a paired duplicate entry
         in the list, TMB ignores the dup and advances/digresses to the next item in the list
         thus ignoring the dupe. (See NOTE III above)
      4. When resident on a tool bar within the list, the button will force the tool bar it
         is on to open. Thus ensuring the user has access to the button.
      5. Added opacity feature to provide mouseover effect without adding additional images.
    04/02/2007: - Ver. 20070402.00 Bug Fix
      1. Fixed bug where nsIPrefServiceObj was un-defined in certain situations.
      2. Changed Opacity total to .99 vs 1.
    04/11/2007: -  Ver. 20070411.00 New Features.
      1. Added Select Dialog activated by a Ctrl+LeftClick.
        a. This dialog allows the operator to select the next toolbar to display.
          1). Selecting a visible toolbar will collapse it. (When NOT riding the bars.)
        b. All non selected toolbars in the list will be collapsed.
        c. The last element in the select list offers the option to copy a list of the
           available toolbars to the clipboard.
             1.) The toolbar list can then be pasted to a text editor.
             2.) These names are then available to copy & paste into the abars array
                 reducing the potential for typo's.
    04/13/2007: -  Ver. 20070413.00 Bug Fix.
      1. Corrected bug introduced with last update.
        a. Updated behavior was inconsistant when riding the bars.
    03/05/2008: - Ver. 20080305.01 Update to more modern code
    03/06/2008: - Ver. 20080306.01 Bug Fix lResident not being set
    */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    /*
      This works for the Initialization side only
    */
    /* +++++++++++++++++--  Tool Bar Array  --++++++++++++++++ */
    this.abars=new Array;               // Define Array
    this.abars.push('nav-bar');         // First Toolbar
    //this.abars.push('TOOL_BAR_IDx');  // Second Toolbar - Replace TOOL_BAR_IDx with the Toolbar ID you wish to control
    //this.abars.push('TOOL_BAR_IDx');  // Third Toolbar  - Replace TOOL_BAR_IDx with the Toolbar ID you wish to control
    //this.abars.push('TOOL_BAR_IDx');  // etc.           - Replace TOOL_BAR_IDx with the Toolbar ID you wish to control
    /* ++++++++++++++++++--  Image Array  --++++++++++++++++++ */
    this.aimg=new Array;          // Define Cpunt Image Array
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFQ4w/ktcfAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAHZJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IRMxSuHgwf0HpGkAggHR4Jqa6nr6NJDEqoEFi1haGoOJCYgxezZxGmbNQpAYgLR4OHLo4NAIVvyAZd/eXU7ObsQoBaoEhRIwxTKAUxWRNgAAmvsop+eVqKQAAAAASUVORK5CYII="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRUf/KyqvwAAAAlwSFlzAAAK8AAACvABQqw0mAAAAIRJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IRN+Ra6pqa6nTwNJCPfB/QcsBIxNS2MwMQExZs+GCBDSMGsWggQD0vxw5NBBJmKUIoPBqwEtvPEAWLBihDchDRjhjQuQHA8s+/bucnJ2I0YDUCXIBmCKZQCnKiJDCQDU3DbBH6JIbwAAAABJRU5ErkJggg=="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRIwGDwBIQAAAAlwSFlzAAAK8AAACvABQqw0mAAAAI5JREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IRN+Ra6pqa6nTwNJCPfB/QcsBIxNS2MwMQExZs+GCBDSMGsWggQD0vxw5NBBLH5AczcawOYkDHcT0oDhbmRArh/wuxubk/C6G5sGvO6myA8s+/bucnJ2I0YDUCXIBmCKZQCnKmL0AAEADsxE28iXdWcAAAAASUVORK5CYII="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRsGBkQv8QAAAAlwSFlzAAAK8AAACvABQqw0mAAAAIBJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IROE45qa6nr6NJBEU4Qm/uD+AxaoTFoag4kJiDF7NooODHGYhlmzECQywBAnzQ9HDh1kIkYpMhi8GoiMBwZEsA6ieGDZt3eXk7MbMRqAKkE2AFMsAzhVERlKABbuSFcePP14AAAAAElFTkSuQmCC"]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRYr9jUNyQAAAAlwSFlzAAAK8AAACvABQqw0mAAAAIpJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IROE45qa6nr6NJBEU4Qm/uD+AxaoTFoag4kJiDF7NooODHGYhlmzECQywBAnzQ9HDh1kwpTA5R9UJ+F1NyENuPxDkR+IjAckJw2ieGDZt3eXk7MbMRqAKkE2AFMsAzhVEaMHCABQz1ZxIZwLSAAAAABJRU5ErkJggg=="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRkw+8jY6gAAAAlwSFlzAAAK8AAACvABQqw0mAAAAHlJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IQNIAwPD/9TU/6dPA0k8bKDKI4ePwjQARYHg9Gk8bIgGFqh9s2YRJsGAND8cOXSQiRilyGAQahgO8cCyb+8uJ2c3YjQAVYJsAKZYIPXg/gMiwwgAc8WbvCnU7RoAAAAASUVORK5CYII="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFR8cn0oTjwAAAAlwSFlzAAAK8AAACvABQqw0mAAAAJVJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IQNIAwPD/9TU/6dPA0k8bKDKI4ePwjQARYHg9Gk8bIgGFqh9s2YRJsGAND8cOXSQCVPCNTXV9fRpIIlVGwsWsbQ0BhMTEGP2bOI0YLgbGZDsh+EQDyz79u5ycnYjRgNQJcgGYIoFUg/uPyBGDxAAAK2mqdY46cAuAAAAAElFTkSuQmCC"]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFR40s+SKNAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAJdJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IQNIAwPD/9TU/6dPA0k8bKDKI4ePwjQARYHg9Gk8bIgGFqh9s2YRJsGAND8cOXSQCcJxTU11PX0aSKIpwhSHOSktjcHEBMSYPRtFB4Y4Nj8gA8r9MBzigWXf3l1Ozm7EaACqBNkATLFA6sH9B8ToAQIATq+yoT7zfI0AAAAASUVORK5CYII="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFR0qYsbklAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAHVJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IQNIAwPD/9TU/6dPA0k8bKDKI4ePwjQARYHg9Gk8bIgGFqh9s2YRJsGAND8cOXRw1A+Dww8s+/bucnJ2I0YDUCXIBmCKBVIP7j8gRg8QAADCuN2jPva/cQAAAABJRU5ErkJggg=="]);
    this.aimt=new Array;          // Define Toggle Image Array
    this.aimt.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAB3RJTUUH1wEbAQ01m0ivQAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAnpJREFUeNqdk11IFFEUx/8zsx9urFAbubWpuRpYRAW5RdBqUS8VlclWZBBhL33RhyGEvRT1HAabayvkY9JDmeijUboRPaQPKVlZaX6llWXr1+7szj3duaPtDvjUgQsX5p7fOed//iP9/DTycOx+TTnmQ7JaYXevQkZODqxZbsSHBhEb/IrErwkQY0iPlWcrG9FTVUUEECkKJQ+WUuxJM80OjNDMj0mamYiKM9vbR7H6BtKKfMbb+dPa0UayQCkKkqcqoN6rg1ayC4j+gTQyDKgqlKbHgM0OLXAE8fADaMU7TV0IgLb/ABI3boEcDixxu+DYvAFoaYI0FQVcy2E/WgYl0g7yeqHeqQErXJcC6DMnK06DnE5YHjVymmY0uBDEIHd1wnblIuTON6CCtdCOHU8BdMHYFh+kb6Ow1AZN7ZEzE2zjJkPcgQFY62rFWNrefSAusADoalNmJpRnbZA/vDcBYLFA7n6bqtb+HPKXz2B8lIUxZMvSZcal9525dZ4sTf428aTpaUjfxwF7BsjjMfLU8TFx0fzFXG3bv8eO6mpR3R44nBppRRbYGq8AyX0fDYBuEp3K/CVgW7eZKqYniyKHSkG5uZB6uiEtAHSHyZGI0EG9dh2Ul4fFQt9/4sx5Y7pmfcVTBkC3pzUcgtTfD7bDj3h9A7SyAMjlEgaj1dlInrsANRgCccGVjhdQnjalpBIUvl9b5SXDJEU+xENhoba+OlZYyLvyGoblW7BdvWwImQ4QH7nT7CdPCJNou/dw1+WD5RcIwZRXL6G0tojK6ckmgOiE+0C+fROW4F1QNvcHt7FuMHl4CJibW1QbSf+dX4/2luM/YrtnfeNfUWwP4zTCIOAAAAAASUVORK5CYII="]);
    this.aimt.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAB3RJTUUH1wEbACk4FdNYbAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAc1JREFUeNqNU7FOG0EQfbN7ZxOEIweQIiGIaClQyog+UvpISNDQJRVFPgAp+Yg0QEeB+QEq+IY0tEg4BYmMERw2DrmTb5eZ2cN3QEQYa+SZ3dk3M29u6Pz4dPfbyebqhUsg4r0HEcGSAcGEM/4571RF5L5uavgyu9yi9YOv/vtxSy9gxzA/Pod2/4SdHDCRhDMC2y5Dc+INyOW4/PObYy1m+nMwib/iGMvBNQ50aA9+AlHMAXVsLW3Afz7iO/FfILnp4jK90DsB/5V1YIyUyeXCD/nQhko4y9r8e3xaXFFX7PtiwxsyRZPamMWzxWehtRFL4gji8O/zAKRSomCWqD70+j/h9jRWtATwgemCg9eNmaez6zi9almBHLgA0hl0Hj8kMwJo1qdKvAo0GnGzbOcJSdLuQwBS5H56Vrj075dKdBq40oqoOkYTPqY8U3enfaj/20d7I3t67FUA15GHJNEjgvIcL+MGelkPtP22kp1wniZF9rJC4ws2R6XbGL2bswq3LqgQrCNkOx+WU4hlYcgXKpDcSiR7kQZArmpifBK6XLxAuifR3RuD6GPtQ2s/+bHaGXaLtmT7GCRnddea6NrwF2oZ1FTIZR7eDRZat2r3oMZakgXCAAAAAElFTkSuQmCC"]);
    /* +++++++++++++++--  This image displays when the toolbar id displayed exceeds 9  -- +++++++++++++++++++++++++++*/
    this.default_img = "data:image/gif;base64,R0lGODlhEAAQAOZEAJaW3C4uloyM16Wl4SAgh6qq4iEhiXl50jQ0nIWF15eX21tbvIKC1YiI1pmZ3Hd3yTw8oVNTuS4uky8vmaOj4WpqxTU1npKS23p600hIqSIiiV5evnh40LW150NDpywskYODzy0tlbm55y0tljk5ndnZ8nh4yk1NtGlpwnl5yJ6e3ZGR1J+f30pKrVlZwDY2oF5euays4ywslH9/1IuL1nR0xjk5nhwcg1NTt01Nt66u4VJSuTIymJGR2YmJ1nd3yKOj4BoagVxcvR0dhf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEQALAAAAAAQABAAQAeMgESCg4SFgkIlgz1DjDiGRA82QiCGQQVECYIAQzdDEYMzCCE+hisBLRtCgwADgiQfQjoqBhMsgiYGMI+CNRqMQwK7REGGBy85IoYMHcKCFTwLqoTEgykeQhkQFIQuAUFBAEISF4IKIwgOPwQnzUS/HM0oBDsxAkMBNIWZBdSDBxYyGhQaAOARBiBEAgEAOw==";
    // *** ************   This state/const var's go here   ************************
    var pointer = -1, homePtr = -1;
    var sres =  "\n L=Forward \n M=Toggle All \n R=Reverse ";
    var snres = "\n L=Forward \n M=Toggle All \n R=Reverse \n Ctrl+R=Go Home";
    this.lResident = false;
    var dadid = this.parentNode.id;
    this.linit = true;
    this.Minit = true;
    var prefId = "extensions.custombuttons.TBM-";
    prefId += custombuttons.getNumber(this.id);
    prefId += ".homePtr";
    var taState = false;
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('...')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.gofwd(this);
      taState = false;
      if (this.abars.length > 1) this.setImage(this, pointer, this.aimg);
    };
    this.sleftclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Replace with call of your choice
    };
    this.aleftclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Replace with call of your choice
    };
    this.cleftclick = function(evt)
    {
      ListToolbarIndexes ( this );
    };
    this.midclick = function(evt)
    {
        this.togTBall(this);
    };
    this.smidclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Replace with call of your choice
    };
    this.amidclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Replace with call of your choice
    };
    this.cmidclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Replace with call of your choice
    };
    this.rightclick = function(evt)
    {
      this.gorev(this);
      taState = false;
      if (this.abars.length > 1) this.setImage(this, pointer, this.aimg);
    };
    this.arightclick = function(evt)
    {
      custombuttons.gQuot.gShowPopup(this);  // Replace with call of your choice
    };
    this.crightclick = function(evt)
    {
      this.goHome( this );//
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    this.setImage = function( btn, p, arr) {
       if (p >= arr.length){
        btn.image = btn.default_img;
       } else {
        btn.image = arr[p];
       }
    };
    this.gofwd = function ( btn ) {
      var ntbar = 0;
      if ( btn.abars.length == 1 ){
        this.setTBState(btn);
        return;
      }
      ntbar = (pointer < btn.abars.length-1)? pointer+1 : 0 ;
      //pointer = (btn.fswapbars (pointer, ntbar, btn)) ? ntbar : pointer ;
      pointer = btn.fswapbars(pointer, ntbar, btn);
      return;
    };
    this.gorev = function ( btn ) {
      var ntbar = 0;
      if ( btn.abars.length == 1 ){
        this.setTBState(btn);
        return;
      }
      ntbar = ( pointer == 0 )? btn.abars.length-1 : pointer - 1 ;
      //pointer = (btn.fswapbars (pointer, ntbar, btn)) ? ntbar : pointer ;
      pointer = btn.fswapbars(pointer, ntbar, btn);
      return;
    };
    this.fixabars = function(btn) {
      var tb = document.getElementsByTagName("toolbar");
      var limit = tb.length;
      var tbn = new Array();
      for (var i = 0 ; i < limit ; i++){
        tbn[i] = tb[i].id;
      }
      limit = btn.abars.length;
      for (var i = 0 ; i < limit ; i++){
        if (tbn.indexOf(btn.abars[i]) < 0 ) {
          alert('Init Error: Toolbar ' + btn.abars[i] +'\n\nNot Found on this Browser\n\nPlease check list item ' + i + ' - ' + btn.abars[i] +'\n\nfor Correct Spelling' );
          btn.abars.splice(i,1);
          --limit;
        }
      }
    };
    this.finit = function ( btn ) {
      btn.checkRes(btn);
      var obtoolbar = {};
      var obtoolbarn = {}, resbar = {};
      var tbar = new Object();
      var lret = false;
      var homeid = "";
      var lcollapsed = null;
      taState = false;
      if (btn.linit){
        btn.fixabars(btn);
        btn.linit = !btn.linit;
        lret = true;
        if (btn.lResident) {              // We are resident so set up the home bar
          resbar = document.getElementById(btn.parentNode.id);
          obtoolbar.collapsed=false;          // put up home tb
          pointer = (btn.abars.indexOf(dadid) < 0 )? 0 : btn.abars.indexOf(dadid);
          //obtoolbar.appendChild(btn);          // Clone Button to home TB
          btn.image = btn.aimg[pointer];
          //resbar.collapsed=true;
        } else {                // NOT Resident
          // obtoolbar.collapsed=false;          // put up home tb
          //for ( i in btn.abars ){
          //  var toolbar = document.getElementById(btn.abars[i]);
          //  toolbar.collapsed = ( i == 0 )? false : true ;
          //}
          pointer = 0;
          btn.image = btn.aimg[0];
        }
        //pointer = 0;
        btn.linit = false;
      }
      return lret ;
    };
    this.fswapbars = function ( obar, nbar, btn ) {
      var otb = document.getElementById(btn.abars[obar]);
      var ntb = document.getElementById(btn.abars[nbar]);
      if (btn.lResident){
        if (otb == ntb) {
          if (nbar > obar) {
            nbar = (nbar == btn.abars.length - 1 ) ? 0 : nbar + 1;  // Skip Repeat bars
          }else{
            nbar = (nbar == 0 ) ? btn.abars.length - 1 : nbar - 1;  // Skip Repeat bars
          }
          ntb = document.getElementById(btn.abars[nbar]);
        }
        ntb.collapsed=false;          // put up new TB
        ntb.appendChild(btn);          // Clone Button to new TB
        otb.collapsed = true;          // pull down the old TB
      } else {
        if (otb != ntb){
          ntb.collapsed = false;          // put up new TB
          otb.collapsed = true;          // pull down the old TB
        } else {
          otb.collapsed = !otb.collapsed;        // Toggle state
        }
      }
      return nbar;
    };
    this.setTBState = function(btn) {
      var tbName = btn.abars[0];
      var tb = document.getElementById(tbName);
      var state = tb.collapsed;
      // Swap the image
      if (state) {      // off
        btn.image = btn.aimt[0];
        } else {        // on
              btn.image = btn.aimt[1];
        }
      // Toggle the Toolbar
      tb.collapsed = !state;
      return;
    };
    this.togTBall = function(btn) {
      btn.Minit = true;
      var tb = null;
      var state = taState;
      var res = btn.checkRes(btn);
      for ( var i = 0 ; i < btn.abars.length ; i++ ) {
        tb = document.getElementById(btn.abars[i]);
        tb.collapsed = (btn.abars[i] == dadid)? tb.collapsed : state;
      }
      if (state) {      // off
        btn.setImage( this, pointer, this.aimg );
        //btn.setImage( btn, 1, btn.aimt );
        } else {        // on
        btn.setImage( btn, 0, btn.aimt );
        }
        taState = !taState;
      return;
    };
    this.goHome = function(btn){
      if (btn.lResident) {
        var obarId = btn.parentNode.id;
        var obar = document.getElementById(obarId);
        var hbar = document.getElementById(btn.abars[homePtr]);
        if(obarId != btn.abars[homePtr] ){
          hbar.collapsed = false;
          hbar.appendChild(btn);
          obar.collapsed = true;
          btn.setImage(btn, homePtr, btn.aimg );
          pointer = homePtr;
        }
      }
    };
    this.checkRes = function (btn) {
      var lret = false, oRes = btn.lResident;
      btn.lResident=lret;
      dadid = btn.parentNode.id;
      for ( var i = 0 ; i < btn.abars.length ; i++ ) {
        if (dadid == btn.abars[i]){
          btn.lResident=true;
          btn.Minit = (btn.lResident != oRes);
          homePtr = (btn.Minit)? i : homePtr;
          btn.setHomePointer( btn, homePtr );
          lret = true;
          btn.lResident=true;
          break;
        }
      }
      homePtr = (btn.lResident != oRes && oRes)? btn.setHomePointer( btn, 0 ) : homePtr ;
      btn.tooltipText = (btn.lResident) ? snres : sres;
      return lret;
    };
    this.setHomePointer = function( btn, p ){
      var nsIPrefBranchObj = nsIPrefServiceObj.getBranch(null);
      nsIPrefBranchObj.setIntPref( prefId, p);
      nsIPrefServiceObj.savePrefFile(null);
    };
    this.getHomePointer = function( btn ){
      var result = 0;
      var nsIPrefBranchObj = nsIPrefServiceObj.getBranch(null);
      if ( nsIPrefBranchObj.getPrefType(prefId) > 0) {
        result = nsIPrefBranchObj.getIntPref(prefId);
      } else {
        btn.setHomePointer( btn , result );
      }
      return result;
    };
    this.initHomePtr = function (btn) {
      var n = btn.getHomePointer( btn );
    };
    this.wrtToClipx = function (str) {
      var gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].
                                        getService(Components.interfaces.nsIClipboardHelper);
      gClipboardHelper.copyString(str);
    };
    this.barSelect = function (items){
      var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
      var selected = {};
      var result = prompts.select(null, "ToolBar Select", "Select the toolbar to toggle.", items.length, items, selected);
      return {lresult : result, nselected : selected}
    };
    // result is true if OK was pressed, false if cancel. selected is the index of the item array
    // that was selected. Get the item using items[selected].
    function ListToolbarIndexes ( btn ){
    //========================================================
    //  Function:
    //
    //      Iterate through the available toolbars showing their 'index' in the list.
    //
    //  Actions:
    //
    //      Determine the available toolbars
    //      For each, display its Identity and index in the list.
    //
    //  Parameters: None.
    //
    //  Return mode: None.
    //
    //  EDITED: Changed function name and output formatting: RDL 02/09/05_03:23
    //========================================================
        var BarList = new Array();
        var cBarList = '';
        var tmpstr = ''
        var toolbar_count;
        var toolbar;
        //  Obtain list of available toolbars
        toolbar_count = btn.abars.length
        for ( i in btn.abars ){
          toolbar = document.getElementById(btn.abars[i]);
          if (toolbar.collapsed) {
            BarList.push( "hidden  " + toolbar.id );
          } else {
            tmpstr =  "visible " + toolbar.id;
            BarList.push(tmpstr.toUpperCase());
          }
        }
        BarList.push("Copy the Toolbar list to Clipboard");
        var baridxobj = btn.barSelect(BarList);
        if (baridxobj.lresult) {
          if (baridxobj.nselected.value == BarList.length-1){
            var tb = document.getElementsByTagName("toolbar");
            for (var i in tb){
              cBarList+= (typeof tb[i].id == 'undefined')? '' : tb[i].id + '\n' ;
            }
            const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
                    .getService(Components.interfaces.nsIClipboardHelper);
            gClipboardHelper.copyString(cBarList);
          } else {
            if ( !btn.lResident ||(btn.lResident && pointer != baridxobj.nselected.value)) {
              btn.fswapbars( pointer, baridxobj.nselected.value, btn )
            }
            for ( i in btn.abars ){
              toolbar = document.getElementById(btn.abars[i]);
              if (!btn.lResident) {
                toolbar.collapsed = ( i != baridxobj.nselected.value )? true :   (BarList[baridxobj.nselected.value].match('VISIBLE') == 'VISIBLE')? true : false ;
              } else {
                toolbar.collapsed = ( i != baridxobj.nselected.value )? true : false ;
              }
            }
            pointer = baridxobj.nselected.value;
            btn.setImage( btn, pointer, btn.aimg );
          }
        }
    };
    /*----------------------- Initialization code goes here ----------------------*/
    var nsIPrefServiceObj = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
    homePtr = this.initHomePtr(this);
    this.linit = !this.finit ( this );
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author","SCClockDr");
    this.setAttribute("version","20080306.01");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toolbar-manipulator.html');
    this.setAttribute("dependency","FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*");
    this.setAttribute("status","Complete");
    this.setAttribute("public",true);
    this.orininalToolTip = this.tooltipText;
    this.tooltipText += (this.lResident) ? snres : sres;
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    ------------------------ New ToolBar Manipulator Button ------------------------
       Left Click ---------> Cycle through the ToolBar list ++
       Ctrl+Left Click ----> Display Selection Dialog   [Allows to select a specific toolbar]
                             [The last element allows to copy the]
                             [available toolbars to the clipboard.]
       Middle Click -------> Toggle the list on/off
       Right Click --------> Reverse through the ToolBar list --
       Ctrl+Right Click ---> Go Home  --- [ When riding the bars ]
       Shift Click --------> Custom Button Menu
      NOTE  I: Due to the manner of button Initialization within the Extension:
      1. If installed to ride the bars, the button will start up on the toolbar it was first placed on.
      2. If the button is moved from a toolbar not in the list to a toolbar in the list. The first
         click will appear to do nothing. (A button move does not trigger an extension driven initialization.
         So it is implemented within the button and requires one click.
      NOTE II: The number of toolbars in the list is only limited by system resources.
      In the current configuration the image rotation will count nine (9) toolbars, then
      a default image is displayed until the toolbar displayed is < 10.
            NOTE III: An Example of the Duplicate toolbar operation:
                 Tool Bar Array         Non-Resident      Resident           Resident
                    Structure           Behavior          Behavior           Behavior
         this.abars=new Array;           L Click           R Click
         this.abars.push('nav-bar');    Show nav-bar      Show nav-bar       Show nav-bar
         this.abars.push('diff-bar');   Show diff-bar     Show diff-bar      Show diff-bar
         this.abars.push('sweet-bar');  Show sweet-bar    Show sweet-bar         Skip
         this.abars.push('sweet-bar');  Hide sweet-bar        Skip           Show sweet-bar
    
  547. ToolBar Manipulator (Beta)

    Code Tab

    /*CODE*/
    // Default Image
    //data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFQ4w/ktcfAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAHZJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IRMxSuHgwf0HpGkAggHR4Jqa6nr6NJDEqoEFi1haGoOJCYgxezZxGmbNQpAYgLR4OHLo4NAIVvyAZd/eXU7ObsQoBaoEhRIwxTKAUxWRNgAAmvsop+eVqKQAAAAASUVORK5CYII=
    /*
       New ToolBar Manipulator Button
         SCClockDr
           Joined: 25 Dec 2006  http://custombuttons.phpbbnow.com/
           Location: SC UpState
         Authored by nicholas and modified by me to ease user implementation.
         Then edited by nicholas again 2008.11.09
       left click ---------> Cycle through the ToolBar list ++
       shift+left click ---> Display Selection Dialog   [Allows to select a specific toolbar]
                  [The last element allows to copy the]
                  [available toolbars to the clipboard.]
       middle click -------> Context Menu
       right click --------> Reverse through the ToolBar list --
       double click -------> Toggle the list on/off
       ctrl+right click ---> Go Home  --- [ When riding the bars ]
       anything else ------> Context Menu
      NOTE  I: Due to the manner of button Initialization within the Extension:
      1. If installed to ride the bars, the button will start up on the toolbar it was first placed on.
      2. If the button is moved from a toolbar not in the list to a toolbar in the list. The first
         click will appear to do nothing. (A button move does not trigger an extension driven initialization.
         So it is implemented within the button and requires one click.
      NOTE II: The number of toolbars in the list is only limited by system resources.
      In the current configuration the image rotation will count nine (9) toolbars, then
      a default image is displayed until the toolbar displayed is < 10.
            NOTE III: An Example of the Duplicate toolbar operation:
                 Tool Bar Array      Non-Resident       Resident           Resident
                    Structure        Behavior       Behavior           Behavior
               this.abars=new Array;           L Click            R Click
         this.abars.push('nav-bar');    Show nav-bar      Show nav-bar       Show nav-bar
         this.abars.push('diff-bar');    Show diff-bar     Show diff-bar      Show diff-bar
         this.abars.push('sweet-bar');  Show sweet-bar    Show sweet-bar         Skip
         this.abars.push('sweet-bar');  Hide sweet-bar        Skip           Show sweet-bar
    Version History:
    02/08/2007: - Ver. 0.0.0001b First beta release of the Toolbar Manipulator. It will:
      1. Toggle a single Toolbar.
      2. Move Forward & Reverse through a list of Toolbars. L | R click.
      3. Toggle the list of Toolbars on / off. M click.
    02/13/2007: - Ver. 0.0.0002b Second Beta release of the Toolbar Manipulator.
      1. Complete re-write to resolve bug causing multiple instances of this button
         to interact adversly with each other. Now seperate instances are autonomous.
    02/14/2007: - Ver. 20070214.00 Third Beta release of the Toolbar Manipulator.
      1. Upgrade - Tool Bar names may now be repeated within the array. Allowing a high
         priority tool bar to appear more than once in the rotation. - Example: nav_bar, bookmark_bar, nav_bar, etc.
    02/16/2007: - Ver. 20070216.05 Fourth Beta release of the Toolbar Manipulator.
      1. Fixed bug which manifests when a toolbar is collapsed manually. The rotation stops
         and the image increment stops.
      2. Upgrade - The Manipilator Now will toggle the bars whilre riding the bars.
         Example: Middle click causes all the bars to collapse and return. the bar where the
            the button resides stay's up. This behavior flows with the button.
      3. Upgrade - Ctrl+Right click action added. When the button is placed on a bar within
         the list, FF rembers this placement, and will prevent moving the button if it resides
         on a different tool bar. This action puts the button on the bar where it was placed.
        * In addition TBM stores a pointer in prefs so it remembers the placement of the button.
      4. Upgrade - Smoother transition from non-resident placement and resident placement.
         The rotation continues from where it was.
    02/16/2007: - Ver. 20070216.06 Bug fix - Removed offending local code that was not for publish.
    02/22/2007: - Ver. 20070222.02 Bug fix
      1. Corrected issue which prevented toggle with a single toolbar in the list.
      2. Fixed un-defined function call in the "this.gofwd" & "this.gorev" functions.
      3. Fixed issue that throws an error when a listed toolbar is missing from the browser.
         The button now removes the offending entry at initialization.
         (The Button issues an Error alert to check it's spelling in abars.)
    02/23/2007: - Ver. 20070223.00 Improve Error message clarity.
    02/25/2007: - Ver. 20070225.00 New features & additions.
      1. Removed Init code that now lets the browser determine the toolbar state
         at startup.
      2. Added feature:  TBM now will toggle the current tool bar to off, if it encounters a
         duplicate tool bar name in a paired fashion. (See NOTE III above)
      3. When resident on a toolbar within the list, and TBM encounters a paired duplicate entry
         in the list, TMB ignores the dup and advances/digresses to the next item in the list
         thus ignoring the dupe. (See NOTE III above)
      4. When resident on a tool bar within the list, the button will force the tool bar it
         is on to open. Thus ensuring the user has access to the button.
      5. Added opacity feature to provide mouseover effect without adding additional images.
    04/02/2007: - Ver. 20070402.00 Bug Fix
      1. Fixed bug where nsIPrefServiceObj was un-defined in certain situations.
      2. Changed Opacity total to .99 vs 1.
    04/11/2007: -  Ver. 20070411.00 New Features.
      1. Added Select Dialog activated by a Ctrl+LeftClick.
        a. This dialog allows the operator to select the next toolbar to display.
          1). Selecting a visible toolbar will collapse it. (When NOT riding the bars.)
        b. All non selected toolbars in the list will be collapsed.
        c. The last element in the select list offers the option to copy a list of the
           available toolbars to the clipboard.
             1.) The toolbar list can then be pasted to a text editor.
             2.) These names are then available to copy & paste into the abars array
                 reducing the potential for typo's.
    04/13/2007: -  Ver. 20070413.00 Bug Fix.
      1. Corrected bug introduced with last update.
        a. Updated behavior was inconsistant when riding the bars.
    03/05/2008: - Ver. 20080305.01 Update to more modern code
    03/06/2008: - Ver. 20080306.01 Bug Fix lResident not being set
    11/09/2008: - Ver. 20081109.00 Beta with new checkbox dialog and lots more features.  Still some bugs.
            1. Go home doesn't work, this seems to be an issue in the original however.
            2. Menu items for toolbars in the context don't work properly
    */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Cb = custombuttons;
    var prefIdtb = "extensions.CustomButtons2@cbtnext.org.TBM-";
    prefIdtb += custombuttons.getNumber(this.id);
    prefIdtb += ".tbars";
    var thBtn = document.popupNode;
    this.ss = [
      { label: 'Go Forward', 
        cmd: 'document.popupNode.leftclick();', 
        sItemId: '' },
      { label: 'Go Backward', 
        cmd: 'document.popupNode.rightclick();', 
        sItemId: '' },
      { label: 'Go to Home Toolbar', 
        cmd: 'document.popupNode.crightclick();', 
        sItemId: 'tbmHomeMI' },
      { label: 'Toggle All', 
        cmd: 'document.popupNode.leftDclick();', 
        sItemId: '' },
      { label: 'Select A Toolbar', 
        cmd: 'document.popupNode.sleftclick();', 
        sItemId: '' },
      { label: 'Reconfigure Toolbars', 
        cmd: 'document.popupNode.listAllToolbars();', 
        sItemId: '' }];
    /* +++++++++++++++++--  Tool Bar Array  --++++++++++++++++ */
    this.listAllToolbars = function() {
      var cbTtl = "Toolbars";
      var cbAcc = "Accept";
      var cbCnl = "Cancel";
      var cbLbl = "Check the toolbars you want to toggle";
      var list;
      var str = "";
      var cbArr = new Array();
      var toolbarsArr = document.getElementsByTagName("toolbar");
      for (q = 0; q < toolbarsArr.length; q++) {
        var toolbar = toolbarsArr[q];
        if (toolbar.hasAttribute("toolbarname")) var name = toolbar.getAttribute("toolbarname");
        if (!toolbar.hasAttribute("toolbarname")) var name = "No-Name";
        var fname = name + " (" + toolbar.id + ")";
        if (toolbar.getAttribute("class").indexOf("chromeclass") != -1) {
          cbArr.push([fname, false, toolbar.id]);
        }
      }
      var cbCheck = custombuttons.checkboxDialog(this,cbArr,cbTtl,cbLbl,null,null,cbAcc,cbCnl,null,null,null,null);
      if (cbCheck) {
        var cbArrT = new Array();
        for(r = 0; r < cbArr.length; r++) {
          if(cbArr[r][1] == true) {
            cbArrT.push([cbArr[r][2]]);
          }
        }
        for(t = 0; t < cbArrT.length; t++) {
          if(t < (cbArrT.length -1)) {
            str += cbArrT[t] + "|";
          }
          else {
            str += cbArrT[t];
          }
        }
      custombuttons.setPrefs(prefIdtb,str);
      this.abars=new Array;
      var aTbars = custombuttons.getPrefs(prefIdtb);
      this.abars = aTbars.split("|");
      homePtr = this.initHomePtr(this);
      this.linit = !this.finit(this);
      custombuttons.alertSlide(this.label, "Your Toolbars have been configured");
      }
      else {
        custombuttons.alertSlide(this.label, "Your Toolbars were NOT configured");
      }
    }
    this.initToggleb = function() {
      if (!custombuttons.isPref(prefIdtb)) { 
        this.listAllToolbars();
      }
      else {
        this.abars=new Array;
        var aTbars = custombuttons.getPrefs(prefIdtb);
        this.abars = aTbars.split("|");
      }
    }
    this.initToggleb();
    /* ++++++++++++++++++--  Image Array  --++++++++++++++++++ */
    this.aimg=new Array;          // Define Cpunt Image Array
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFQ4w/ktcfAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAHZJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IRMxSuHgwf0HpGkAggHR4Jqa6nr6NJDEqoEFi1haGoOJCYgxezZxGmbNQpAYgLR4OHLo4NAIVvyAZd/eXU7ObsQoBaoEhRIwxTKAUxWRNgAAmvsop+eVqKQAAAAASUVORK5CYII="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRUf/KyqvwAAAAlwSFlzAAAK8AAACvABQqw0mAAAAIRJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IRN+Ra6pqa6nTwNJCPfB/QcsBIxNS2MwMQExZs+GCBDSMGsWggQD0vxw5NBBJmKUIoPBqwEtvPEAWLBihDchDRjhjQuQHA8s+/bucnJ2I0YDUCXIBmCKZQCnKiJDCQDU3DbBH6JIbwAAAABJRU5ErkJggg=="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRIwGDwBIQAAAAlwSFlzAAAK8AAACvABQqw0mAAAAI5JREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IRN+Ra6pqa6nTwNJCPfB/QcsBIxNS2MwMQExZs+GCBDSMGsWggQD0vxw5NBBLH5AczcawOYkDHcT0oDhbmRArh/wuxubk/C6G5sGvO6myA8s+/bucnJ2I0YDUCXIBmCKZQCnKmL0AAEADsxE28iXdWcAAAAASUVORK5CYII="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRsGBkQv8QAAAAlwSFlzAAAK8AAACvABQqw0mAAAAIBJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IROE45qa6nr6NJBEU4Qm/uD+AxaoTFoag4kJiDF7NooODHGYhlmzECQywBAnzQ9HDh1kIkYpMhi8GoiMBwZEsA6ieGDZt3eXk7MbMRqAKkE2AFMsAzhVERlKABbuSFcePP14AAAAAElFTkSuQmCC"]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRYr9jUNyQAAAAlwSFlzAAAK8AAACvABQqw0mAAAAIpJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IROE45qa6nr6NJBEU4Qm/uD+AxaoTFoag4kJiDF7NooODHGYhlmzECQywBAnzQ9HDh1kwpTA5R9UJ+F1NyENuPxDkR+IjAckJw2ieGDZt3eXk7MbMRqAKkE2AFMsAzhVEaMHCABQz1ZxIZwLSAAAAABJRU5ErkJggg=="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFRkw+8jY6gAAAAlwSFlzAAAK8AAACvABQqw0mAAAAHlJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IQNIAwPD/9TU/6dPA0k8bKDKI4ePwjQARYHg9Gk8bIgGFqh9s2YRJsGAND8cOXSQiRilyGAQahgO8cCyb+8uJ2c3YjQAVYJsAKZYIPXg/gMiwwgAc8WbvCnU7RoAAAAASUVORK5CYII="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFR8cn0oTjwAAAAlwSFlzAAAK8AAACvABQqw0mAAAAJVJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IQNIAwPD/9TU/6dPA0k8bKDKI4ePwjQARYHg9Gk8bIgGFqh9s2YRJsGAND8cOXSQCVPCNTXV9fRpIIlVGwsWsbQ0BhMTEGP2bOI0YLgbGZDsh+EQDyz79u5ycnYjRgNQJcgGYIoFUg/uPyBGDxAAAK2mqdY46cAuAAAAAElFTkSuQmCC"]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFR40s+SKNAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAJdJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IQNIAwPD/9TU/6dPA0k8bKDKI4ePwjQARYHg9Gk8bIgGFqh9s2YRJsGAND8cOXSQCcJxTU11PX0aSKIpwhSHOSktjcHEBMSYPRtFB4Y4Nj8gA8r9MBzigWXf3l1Ozm7EaACqBNkATLFA6sH9B8ToAQIATq+yoT7zfI0AAAAASUVORK5CYII="]);
    this.aimg.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFXRFWHRDcmVhdGlvbiBUaW1lAAfXAR0UNjejc/xjAAAAB3RJTUUH1wEdFR0qYsbklAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAHVJREFUeNpjuHz5MgMjCzFo3759T548ZQSydv3/w0AEcGNkefL4IQNIAwPD/9TU/6dPA0k8bKDKI4ePwjQARYHg9Gk8bIgGFqh9s2YRJsGAND8cOXRw1A+Dww8s+/bucnJ2I0YDUCXIBmCKBVIP7j8gRg8QAADCuN2jPva/cQAAAABJRU5ErkJggg=="]);
    this.aimt=new Array;          // Define Toggle Image Array
    this.aimt.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAB3RJTUUH1wEbAQ01m0ivQAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAnpJREFUeNqdk11IFFEUx/8zsx9urFAbubWpuRpYRAW5RdBqUS8VlclWZBBhL33RhyGEvRT1HAabayvkY9JDmeijUboRPaQPKVlZaX6llWXr1+7szj3duaPtDvjUgQsX5p7fOed//iP9/DTycOx+TTnmQ7JaYXevQkZODqxZbsSHBhEb/IrErwkQY0iPlWcrG9FTVUUEECkKJQ+WUuxJM80OjNDMj0mamYiKM9vbR7H6BtKKfMbb+dPa0UayQCkKkqcqoN6rg1ayC4j+gTQyDKgqlKbHgM0OLXAE8fADaMU7TV0IgLb/ABI3boEcDixxu+DYvAFoaYI0FQVcy2E/WgYl0g7yeqHeqQErXJcC6DMnK06DnE5YHjVymmY0uBDEIHd1wnblIuTON6CCtdCOHU8BdMHYFh+kb6Ow1AZN7ZEzE2zjJkPcgQFY62rFWNrefSAusADoalNmJpRnbZA/vDcBYLFA7n6bqtb+HPKXz2B8lIUxZMvSZcal9525dZ4sTf428aTpaUjfxwF7BsjjMfLU8TFx0fzFXG3bv8eO6mpR3R44nBppRRbYGq8AyX0fDYBuEp3K/CVgW7eZKqYniyKHSkG5uZB6uiEtAHSHyZGI0EG9dh2Ul4fFQt9/4sx5Y7pmfcVTBkC3pzUcgtTfD7bDj3h9A7SyAMjlEgaj1dlInrsANRgCccGVjhdQnjalpBIUvl9b5SXDJEU+xENhoba+OlZYyLvyGoblW7BdvWwImQ4QH7nT7CdPCJNou/dw1+WD5RcIwZRXL6G0tojK6ckmgOiE+0C+fROW4F1QNvcHt7FuMHl4CJibW1QbSf+dX4/2luM/YrtnfeNfUWwP4zTCIOAAAAAASUVORK5CYII="]);
    this.aimt.push(["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAB3RJTUUH1wEbACk4FdNYbAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAc1JREFUeNqNU7FOG0EQfbN7ZxOEIweQIiGIaClQyog+UvpISNDQJRVFPgAp+Yg0QEeB+QEq+IY0tEg4BYmMERw2DrmTb5eZ2cN3QEQYa+SZ3dk3M29u6Pz4dPfbyebqhUsg4r0HEcGSAcGEM/4571RF5L5uavgyu9yi9YOv/vtxSy9gxzA/Pod2/4SdHDCRhDMC2y5Dc+INyOW4/PObYy1m+nMwib/iGMvBNQ50aA9+AlHMAXVsLW3Afz7iO/FfILnp4jK90DsB/5V1YIyUyeXCD/nQhko4y9r8e3xaXFFX7PtiwxsyRZPamMWzxWehtRFL4gji8O/zAKRSomCWqD70+j/h9jRWtATwgemCg9eNmaez6zi9almBHLgA0hl0Hj8kMwJo1qdKvAo0GnGzbOcJSdLuQwBS5H56Vrj075dKdBq40oqoOkYTPqY8U3enfaj/20d7I3t67FUA15GHJNEjgvIcL+MGelkPtP22kp1wniZF9rJC4ws2R6XbGL2bswq3LqgQrCNkOx+WU4hlYcgXKpDcSiR7kQZArmpifBK6XLxAuifR3RuD6GPtQ2s/+bHaGXaLtmT7GCRnddea6NrwF2oZ1FTIZR7eDRZat2r3oMZakgXCAAAAAElFTkSuQmCC"]);
    /* +++++++++++++++--  This image displays when the toolbar id displayed exceeds 9  -- +++++++++++++++++++++++++++*/
    this.default_img = "data:image/gif;base64,R0lGODlhEAAQAOZEAJaW3C4uloyM16Wl4SAgh6qq4iEhiXl50jQ0nIWF15eX21tbvIKC1YiI1pmZ3Hd3yTw8oVNTuS4uky8vmaOj4WpqxTU1npKS23p600hIqSIiiV5evnh40LW150NDpywskYODzy0tlbm55y0tljk5ndnZ8nh4yk1NtGlpwnl5yJ6e3ZGR1J+f30pKrVlZwDY2oF5euays4ywslH9/1IuL1nR0xjk5nhwcg1NTt01Nt66u4VJSuTIymJGR2YmJ1nd3yKOj4BoagVxcvR0dhf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEQALAAAAAAQABAAQAeMgESCg4SFgkIlgz1DjDiGRA82QiCGQQVECYIAQzdDEYMzCCE+hisBLRtCgwADgiQfQjoqBhMsgiYGMI+CNRqMQwK7REGGBy85IoYMHcKCFTwLqoTEgykeQhkQFIQuAUFBAEISF4IKIwgOPwQnzUS/HM0oBDsxAkMBNIWZBdSDBxYyGhQaAOARBiBEAgEAOw==";
    // *** ************   This state/const var's go here   ************************
    var pointer = -1, homePtr = -1;
    var sres =  "L: Forward | R: Backward | D: Toggle All\n" +
                "―――――――――――――――――――\n\t" +
                "M: Context Menu\n\t" +
                "L+Shift: Select From List";
    var snres = "L: Forward | R: Backward | D: Toggle All\n" +
                "―――――――――――――――――――\n\t" +
                "M: Context Menu\n\t" +
                "L+Shift: Select From List\n\t" +
                "R+Ctrl: Go Home";
    this.lResident = false;
    var dadid = this.parentNode.id;
    this.linit = true;
    this.Minit = true;
    var prefId = "extensions.CustomButtons2@cbtnext.org.TBM-";
    prefId += custombuttons.getNumber(this.id);
    prefId += ".homePtr";
    var taState = false;
    let Cb2s = cb2String;
    this.leftclick = function(evt) {
      this.gofwd(this);
      taState = false;
      if (this.abars.length > 1) this.setImage(this, pointer, this.aimg);
    };
    this.sleftclick = function(evt) {
      this.ListToolbarIndexes(this);
    };
    this.leftDclick = function(evt) {
      this.togTBall(this);
    };
    this.rightclick = function(evt) {
      this.gorev(this);
      taState = false;
      if (this.abars.length > 1) this.setImage(this, pointer, this.aimg);
      evt.stopPropagation();
    };
    this.crightclick = function(evt) {
      this.goHome(this);//
    };
    this.setAttribute('onclick', 'custombuttons.gQuot.mHandler(event, this)');
    this.setAttribute('ondblclick', 'custombuttons.gQuot.mHandler(event, this)');
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    this.setImage = function( btn, p, arr) {
       if (p >= arr.length){
        btn.image = btn.default_img;
       } else {
        btn.image = arr[p];
       }
    };
    this.gofwd = function ( btn ) {
      var ntbar = 0;
      if ( btn.abars.length == 1 ){
        this.setTBState(btn);
        return;
      }
      ntbar = (pointer < btn.abars.length-1)? pointer+1 : 0 ;
      //pointer = (btn.fswapbars (pointer, ntbar, btn)) ? ntbar : pointer ;
      pointer = btn.fswapbars(pointer, ntbar, btn);
      return;
    };
    this.gorev = function ( btn ) {
      var ntbar = 0;
      if ( btn.abars.length == 1 ){
        this.setTBState(btn);
        return;
      }
      ntbar = ( pointer == 0 )? btn.abars.length-1 : pointer - 1 ;
      //pointer = (btn.fswapbars (pointer, ntbar, btn)) ? ntbar : pointer ;
      pointer = btn.fswapbars(pointer, ntbar, btn);
      return;
    };
    this.fixabars = function(btn) {
      var tb = document.getElementsByTagName("toolbar");
      var limit = tb.length;
      var tbn = new Array();
      for (var i = 0 ; i < limit ; i++){
        tbn[i] = tb[i].id;
      }
      limit = btn.abars.length;
      for (var i = 0 ; i < limit ; i++){
        if (tbn.indexOf(btn.abars[i]) < 0 ) {
          alert('Init Error: Toolbar ' + btn.abars[i] +'\n\nNot Found on this Browser\n\nPlease check list item ' + i + ' - ' + btn.abars[i] +'\n\nfor Correct Spelling' );
          btn.abars.splice(i,1);
          --limit;
        }
      }
    };
    this.finit = function ( btn ) {
      btn.checkRes(btn);
      var obtoolbar = {};
      var obtoolbarn = {}, resbar = {};
      var tbar = new Object();
      var lret = false;
      var homeid = "";
      var lcollapsed = null;
      taState = false;
      if (btn.linit){
        btn.fixabars(btn);
        btn.linit = !btn.linit;
        lret = true;
        if (btn.lResident) {              // We are resident so set up the home bar
          resbar = document.getElementById(btn.parentNode.id);
          obtoolbar.collapsed=false;          // put up home tb
          pointer = (btn.abars.indexOf(dadid) < 0 )? 0 : btn.abars.indexOf(dadid);
          //obtoolbar.appendChild(btn);          // Clone Button to home TB
          btn.image = btn.aimg[pointer];
          //resbar.collapsed=true;
        } else {                // NOT Resident
          // obtoolbar.collapsed=false;          // put up home tb
          //for ( i in btn.abars ){
          //  var toolbar = document.getElementById(btn.abars[i]);
          //  toolbar.collapsed = ( i == 0 )? false : true ;
          //}
          pointer = 0;
          btn.image = btn.aimg[0];
        }
        //pointer = 0;
        btn.linit = false;
      }
      return lret ;
    };
    this.fswapbars = function ( obar, nbar, btn ) {
      var otb = document.getElementById(btn.abars[obar]);
      var ntb = document.getElementById(btn.abars[nbar]);
      if (btn.lResident){
        if (otb == ntb) {
          if (nbar > obar) {
            nbar = (nbar == btn.abars.length - 1 ) ? 0 : nbar + 1;  // Skip Repeat bars
          }else{
            nbar = (nbar == 0 ) ? btn.abars.length - 1 : nbar - 1;  // Skip Repeat bars
          }
          ntb = document.getElementById(btn.abars[nbar]);
        }
        ntb.collapsed=false;          // put up new TB
        ntb.appendChild(btn);          // Clone Button to new TB
        otb.collapsed = true;          // pull down the old TB
      } else {
        if (otb != ntb){
          ntb.collapsed = false;          // put up new TB
          otb.collapsed = true;          // pull down the old TB
        } else {
          otb.collapsed = !otb.collapsed;        // Toggle state
        }
      }
      return nbar;
    };
    this.fswapbarsB = function ( obar, nbar, btn ) {
      for(var m in this.abars) {
        if('"'+obar+'"' == '"'+this.abars[m]+'"') {
          var ootb = m;
        }
        else {
          alert(obar);
          alert(nbar);
        }
      }
      var otb = document.getElementById(btn.abars[ootb]);
      var ntb = document.getElementById(btn.abars[nbar]);
      if (btn.lResident){
        if (otb == ntb) {
          if (nbar > obar) {
            nbar = (nbar == btn.abars.length - 1 ) ? 0 : nbar + 1;  // Skip Repeat bars
          }else{
            nbar = (nbar == 0 ) ? btn.abars.length - 1 : nbar - 1;  // Skip Repeat bars
          }
          ntb = document.getElementById(btn.abars[nbar]);
        }
        ntb.collapsed=false;          // put up new TB
        ntb.appendChild(btn);          // Clone Button to new TB
        otb.collapsed = true;          // pull down the old TB
      } else {
        if (otb != ntb){
    alert(otb.id);
    alert(ntb.id);
          ntb.collapsed = false;          // put up new TB
          otb.collapsed = true;          // pull down the old TB
        } else {
          otb.collapsed = !otb.collapsed;        // Toggle state
        }
      }
      return nbar;
    };
    this.setTBState = function(btn) {
      var tbName = btn.abars[0];
      var tb = document.getElementById(tbName);
      var state = tb.collapsed;
      // Swap the image
      if (state) {      // off
        btn.image = btn.aimt[0];
        } else {        // on
              btn.image = btn.aimt[1];
        }
      // Toggle the Toolbar
      tb.collapsed = !state;
      return;
    };
    this.togTBall = function(btn) {
      btn.Minit = true;
      var tb = null;
      var state = taState;
      var res = btn.checkRes(btn);
      for ( var i = 0 ; i < btn.abars.length ; i++ ) {
        tb = document.getElementById(btn.abars[i]);
        tb.collapsed = (btn.abars[i] == dadid)? tb.collapsed : state;
      }
      if (state) {      // off
        btn.setImage( this, pointer, this.aimg );
        //btn.setImage( btn, 1, btn.aimt );
        } else {        // on
        btn.setImage( btn, 0, btn.aimt );
        }
        taState = !taState;
      return;
    };
    this.goHome = function(btn){
      if (btn.lResident) {
        var obarId = btn.parentNode.id;
        var obar = document.getElementById(obarId);
        var hbar = document.getElementById(btn.abars[homePtr]);
        if(obarId != btn.abars[homePtr] ){
          hbar.collapsed = false;
          hbar.appendChild(btn);
          obar.collapsed = true;
          btn.setImage(btn, homePtr, btn.aimg );
          pointer = homePtr;
        }
      }
    };
    this.checkRes = function (btn) {
      var lret = false, oRes = btn.lResident;
      btn.lResident=lret;
      dadid = btn.parentNode.id;
      for ( var i = 0 ; i < btn.abars.length ; i++ ) {
        if (dadid == btn.abars[i]){
          btn.lResident=true;
          btn.Minit = (btn.lResident != oRes);
          homePtr = (btn.Minit)? i : homePtr;
          custombuttons.setPrefs( btn, homePtr );
          lret = true;
          btn.lResident=true;
          break;
        }
      }
      homePtr = (btn.lResident != oRes && oRes)? custombuttons.setPrefs( btn, 0 ) : homePtr ;
      btn.tooltipText = (btn.lResident) ? snres : sres;
      return lret;
    };
    this.getHomePointer = function( btn ){
      var result = 0;
      if ( custombuttons.getPrefs(prefId) > 0) {
        result = custombuttons.getPrefs(prefId);
      } else {
        custombuttons.setPrefs(prefId, result);
      }
      return result;
    };
    this.initHomePtr = function (btn) {
      var n = btn.getHomePointer( btn );
    };
    this.barSelect = function (items){
      var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
      var selected = {};
      var result = prompts.select(null, "ToolBar Select", "Select the toolbar to toggle.", items.length, items, selected);
      return {lresult : result, nselected : selected}
    };
    // result is true if OK was pressed, false if cancel. selected is the index of the item array
    // that was selected. Get the item using items[selected].
    this.ListToolbarIndexes = function( btn ) {
    //========================================================
    //  Function:
    //
    //      Iterate through the available toolbars showing their 'index' in the list.
    //
    //  Actions:
    //
    //      Determine the available toolbars
    //      For each, display its Identity and index in the list.
    //
    //  Parameters: None.
    //
    //  Return mode: None.
    //
    //  EDITED: Changed function name and output formatting: RDL 02/09/05_03:23
    //========================================================
        var BarList = new Array();
        var cBarList = '';
        var tmpstr = ''
        var toolbar_count;
        var toolbar;
        //  Obtain list of available toolbars
        toolbar_count = btn.abars.length
        for ( i in btn.abars ){
          toolbar = document.getElementById(btn.abars[i]);
          if (toolbar.collapsed) {
            BarList.push( "hidden  " + toolbar.id );
          } else {
            tmpstr =  "visible " + toolbar.id;
            BarList.push(tmpstr.toUpperCase());
          }
        }
        BarList.push("Copy the Toolbar list to Clipboard");
        var baridxobj = btn.barSelect(BarList);
        if (baridxobj.lresult) {
          if (baridxobj.nselected.value == BarList.length-1){
            var tb = document.getElementsByTagName("toolbar");
            for (var i in tb){
              cBarList+= (typeof tb[i].id == 'undefined')? '' : tb[i].id + '\n' ;
            }
            custombuttons.gClipboard.write(cBarList);
          } else {
            if ( !btn.lResident ||(btn.lResident && pointer != baridxobj.nselected.value)) {
              btn.fswapbars( pointer, baridxobj.nselected.value, btn )
            }
            for ( i in btn.abars ){
              toolbar = document.getElementById(btn.abars[i]);
              if (!btn.lResident) {
                toolbar.collapsed = ( i != baridxobj.nselected.value )? true :   (BarList[baridxobj.nselected.value].match('VISIBLE') == 'VISIBLE')? true : false ;
              } else {
                toolbar.collapsed = ( i != baridxobj.nselected.value )? true : false ;
              }
            }
            pointer = baridxobj.nselected.value;
            btn.setImage( btn, pointer, btn.aimg );
          }
        }
    };
    /*----------------------- Initialization code goes here ----------------------*/
    this.mObj = Cb.getCbContextObj(this);
    this.init = function(x) {
      x.mObj.setSub();
      var nItem = {}, mItem = {};
      document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
      for (var l in this.abars) {
        //alert(document.getElementById(this.abars[l]).getAttribute("toolbarname"));
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = document.getElementById(this.abars[l]).getAttribute("toolbarname");
        if(document.getElementById(this.abars[l]).collapsed) { nItem.value = "hidden"; }
        else { nItem.value = "visible"; }
        mItem = x.mObj.insertBefore(nItem , x.mObj.oMenu.lastChild);
        mItem.setAttribute('oncommand','if ( !document.popupNode.lResident ||(document.popupNode.lResident && document.popupNode.pointer != '+l+')) { document.popupNode.fswapbars( document.popupNode.pointer, '+l+', document.popupNode ) } var toolbar = document.getElementById('+this.abars[l]+'); if (!document.popupNode.lResident) { toolbar.collapsed = ( '+l+' != '+l+' )? true : ('+nItem.value+'.match("visible") == "visible")? true : false ; } else { toolbar.collapsed = ( l != '+nItem.value+' )? true : false ; } document.popupNode.pointer = '+nItem.value+'; document.popupNode.setImage( document.popupNode, document.popupNode.pointer, document.popupNode.aimg );');
      }
      for(var i in x.ss) {
        nItem = new x.mObj.getItem();
        nItem.id = 'Note';
        nItem.label = x.ss[i].label;
        if (x.ss[i].sItemId == "tbmHomeMI") { nItem.value = "tbmHomeMI" }
        else { nItem.value = String(i); }
        mItem = x.mObj.insertBefore(nItem , x.mObj.oMenu.lastChild);
        mItem.setAttribute('oncommand',x.ss[i].cmd);
        this.ss[i].sItemId = mItem.id;
    //    if((x.ss[i].label).match("Home") && document.popupNode.lResident) nItem.disabled = 'true';
      }
      x.mObj.getItem();
      nItem = x.mObj.getItem();
      nItem.id = 'Note';
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling);
      this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild.previousSibling);
    }
    this.init(this);
    homePtr = this.initHomePtr(this);
    this.linit = !this.finit(this);
    document.getElementById(CB2const.sCBCtxtMenu).setAttribute('onpopupshowing', 'var tbmHomeMI=document.getElementById(CB2const.sCBCtxtMenu).getElementsByAttribute("value","tbmHomeMI"); for(var z in tbmHomeMI) { if (document.popupNode.tooltipText.match("Home")) { tbmHomeMI[z].disabled = false; } else { tbmHomeMI[z].disabled = true; tbmHomeMI[z].tooltipText = "This option only available\\nwhen \\"riding the bars\\""; } }');
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute("author","SCClockDr,nicholas");
    this.setAttribute("version","20081109.beta1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toolbar-manipulator.html');
    this.setAttribute("dependency","FF3.0*, FL2.0*, CB2 2.0.5*");
    this.setAttribute("status","Beta");
    this.setAttribute("public",true);
    this.orininalToolTip = this.tooltipText;
    //this.tooltipText += (this.lResident) ? snres : sres;
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    ------------------------ New ToolBar Manipulator Button ------------------------
       left click ---------> Cycle through the ToolBar list ++
       shift+left click ---> Display Selection Dialog   [Allows to select a specific toolbar]
                  [The last element allows to copy the]
                  [available toolbars to the clipboard.]
       middle click -------> Context Menu
       right click --------> Reverse through the ToolBar list --
       double click -------> Toggle the list on/off
       ctrl+right click ---> Go Home  --- [ When riding the bars ]
       anything else ------> Context Menu
      NOTE  I: Due to the manner of button Initialization within the Extension:
      1. If installed to ride the bars, the button will start up on the toolbar it was first placed on.
      2. If the button is moved from a toolbar not in the list to a toolbar in the list. The first
         click will appear to do nothing. (A button move does not trigger an extension driven initialization.
         So it is implemented within the button and requires one click.
      NOTE II: The number of toolbars in the list is only limited by system resources.
      In the current configuration the image rotation will count nine (9) toolbars, then
      a default image is displayed until the toolbar displayed is < 10.
            NOTE III: An Example of the Duplicate toolbar operation:
                 Tool Bar Array         Non-Resident      Resident           Resident
                    Structure           Behavior          Behavior           Behavior
         this.abars=new Array;           L Click           R Click
         this.abars.push('nav-bar');    Show nav-bar      Show nav-bar       Show nav-bar
         this.abars.push('diff-bar');   Show diff-bar     Show diff-bar      Show diff-bar
         this.abars.push('sweet-bar');  Show sweet-bar    Show sweet-bar         Skip
         this.abars.push('sweet-bar');  Hide sweet-bar        Skip           Show sweet-bar
    
  548. Toolbar Names List

    Code Tab

    var cbTtl = "Toolbars";
    var cbAcc = "Copy List to Clipboard";
    var cbCnl = "Get Out of Here";
    var cbLbl = "Check the buttons you want in your list";
    function listToolbars() {
      var list;
      var str = "";
      var cbArr = new Array();
      var toolbarsArr = document.getElementsByTagName("toolbar");
      for (i = 0; i < toolbarsArr.length; i++) {
        var toolbar = toolbarsArr[i];
        var h = toolbar.getAttribute("hidden");
        var c = toolbar.getAttribute("collapsed");
        if (toolbar.hasAttribute("toolbarname")) var name = toolbar.getAttribute("toolbarname");
        if (!toolbar.hasAttribute("toolbarname")) var name = "No-Name";
        if (h == "true" && c == "true") var hidden = "true";
        if ((h == "false" || h == "") && (c == "false" || c == "")) var hidden = "false";
        if (h == "true" && (c == "false" || c == "")) var hidden = "true";
        if ((h == "false" || h == "") && c == "true") var hidden = "true";
        if (h == "" && c == "") var hidden = "false";
        var fname = name + "\t|\t" + toolbar.id;
        if (toolbar.getAttribute("class").indexOf("chromeclass") != -1) {
          cbArr.push([fname, true]);
        }
      }
      var cbCheck = custombuttons.checkboxDialog(this,cbArr,cbTtl,cbLbl,null,null,cbAcc,cbCnl,null,null,null,null);
      if (cbCheck) {
        for(j = 0; j < cbArr.length; j++) {
          if(cbArr[j][1] == true) {
            str += cbArr[j][0] + "\n";
          }
        }
        custombuttons.gClipboard.write(str);
      }
    }
    listToolbars();

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute('author','cblover,nicholas');
    this.setAttribute('version','20081106.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toolbar-names-list.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    Click the button to get a list of all your toolbar's id's
    Buttons with ">" in front of them are currently not visible in your browser
  549. Toolbar toggler²

    Code Tab

    /*
    This uses some code from "Toolbar Names List" (http://custombuttons2.com/forum/post1728.html#p1728) thanks to nicholas and cblover for that button. Thank you also to beerman for his toggle statusbar button (http://custombuttons2.com/forum/post4353.html#p4353), which gave me the idea (and the id needed) to add support for toggling the statusbar to this button. Further thanks go to jet-plane for his toggle tabbar button (http://custombuttons2.com/forum/post618.html#p618), from which I took the basic code to toggle the tab bar.
    Double click the button to see 3 lists of your toolbars in a radio button dialogue.
    The top list allows you to choose which toolbar is toggled by left clicking the button, 
    the middle list allows you to choose which toolbar is toggled by middle clicking the button
    and the bottom list allows you to choose which toolbar is toggled by right clicking the button.
    (After setting the toolbars, Alt+L will toggle all of the chosen ones at once.)
    If you click cancel on the dialogue it will leave the button toggling the toolbars it was toggling previously for each click (even if it was toggling nothing).
    Rawny ^^
    */
    

    Initialization Tab

    // ***** VARS ***** //
    var button = this;
    var Cb = custombuttons;
    var num = Cb.getNumber(this.id);
    var prefstring = "custombuttons.toggler-"+num+".toolbars";
    var statepref = prefstring+".state";
    var tabbarprefstring = "browser.tabs.forceHide";
    var TB1, TB2, TB3, State1, State2, State3;
    // ***** FUNCTIONS ***** //
    function GetPrefs() {
      if ((!Cb.isPref(prefstring)) || (Cb.getPrefs(prefstring) == "")) { 
        Cb.setPrefs(prefstring,"");
        button.tooltipText = "Double click to choose toolbars to toggle";
        return false;
      } 
      else {
        var TBStr = Cb.getPrefs(prefstring);
        var TBArr = TBStr.split(",");
        TB1 = TBArr[0];
        TB2 = TBArr[1];
        if (TB1 == 'tabbrowser-strip') {
          TB1name = "Tab bar"
        } else {
          if (document.getElementById(TB1).hasAttribute("toolbarname"))
            TB1name = document.getElementById(TB1).getAttribute("toolbarname");
          else
            TB1name = TB1;
        }
        if (TB2 == 'tabbrowser-strip') {
          TB2name = "Tab bar"
        } else {
          if (document.getElementById(TB2).hasAttribute("toolbarname"))
            TB2name = document.getElementById(TB2).getAttribute("toolbarname");
          else
            TB2name = TB2;
        }
        var tooltip = "L: Toggle toolbar '"+TB1name+"'"+"\n"+"M: Toggle toolbar '"+TB2name+"'"+"\n"+"Alt+L: Toggle both toolbars"+"\n"+"Double: Choose toolbars to toggle";
        if (TBArr.length == 3 && TBArr[2] != "undefined") {
            TB3 = TBArr[2];
            if (TB3 == 'tabbrowser-strip') {
              TB3name = "Tab bar"
            } else {
              if (document.getElementById(TB3).hasAttribute("toolbarname"))
                TB3name = document.getElementById(TB3).getAttribute("toolbarname");
              else
                TB3name = TB3;
            }
            var tooltip = "L: Toggle toolbar '"+TB1name+"'"+"\n"+"M: Toggle toolbar '"+TB2name+"'"+"\n"+"R: Toggle toolbar '"+TB3name+"'"+"\n"+"Alt+L: Toggle all 3 toolbars"+"\n"+"Double: Choose toolbars to toggle";
        }
        button.tooltipText = tooltip;
        return true;
      }
    }
    function GetStates() {
      if ((!Cb.isPref(statepref)) || (Cb.getPrefs(statepref) == "")) { 
        Cb.setPrefs(statepref,"");
        return false;
      } 
      else {
        var StateStr = Cb.getPrefs(statepref);
        var StateArr = StateStr.split(",");
        State1 = StateArr[0];
        State2 = StateArr[1];
        if (StateArr.length == 3)
          State3 = StateArr[2];
        else
          State3 = false;
        return true;
      }
    }
    function listToolbars() {
      var selTtl = "Toolbars to be toggled";
      var selLbl = "Select the toolbars you want to be toggled on left click, on middle click and on right click";
      var str = "";
      var selArr = [[], [], []];
      var toolbarsArr = document.getElementsByTagName("toolbar");
      for (i = 0; i < toolbarsArr.length; i++) {
        var toolbar = toolbarsArr[i];
        var h = toolbar.getAttribute("hidden");
        var c = toolbar.getAttribute("collapsed");
        if (toolbar.hasAttribute("toolbarname")) var name = toolbar.getAttribute("toolbarname");
        if (!toolbar.hasAttribute("toolbarname")) var name = "No name";
        if (h == "true" && c == "true") var hidden = "true";
        if ((h == "false" || h == "") && (c == "false" || c == "")) var hidden = "false";
        if (h == "true" && (c == "false" || c == "")) var hidden = "true";
        if ((h == "false" || h == "") && c == "true") var hidden = "true";
        if (h == "" && c == "") var hidden = "false";
        var fname = name + " - " + toolbar.id;
        if ((toolbar.getAttribute("class").indexOf("chromeclass") != -1) && (toolbar.id != button.parentNode.id)) {
          selArr[0].push([fname, (toolbar.id == TB1), toolbar.id]);
          selArr[1].push([fname, (toolbar.id == TB2), toolbar.id]);
          selArr[2].push([fname, (toolbar.id == TB3), toolbar.id]);
        }
      }
      if ((button.parentNode.id != 'tt-toolbar-statusbar1') && (button.parentNode.id != 'tt-toolbar-statusbar2')) {
    	selArr[0].push(["Statusbar - status-bar", ('status-bar' == TB1), 'status-bar']);
    	selArr[1].push(["Statusbar - status-bar", ('status-bar' == TB2), 'status-bar']);
    	selArr[2].push(["Statusbar - status-bar", ('status-bar' == TB3), 'status-bar']);
      }
      if ((button.parentNode.id != 'tt-toolbar-tabright') && (button.parentNode.id != 'tt-toolbar-tableft')) {
    	selArr[0].push(["Tab bar - tabbrowser-strip", ('tabbrowser-strip' == TB1), 'tabbrowser-strip']);
    	selArr[1].push(["Tab bar - tabbrowser-strip", ('tabbrowser-strip' == TB2), 'tabbrowser-strip']);
    	selArr[2].push(["Tab bar - tabbrowser-strip", ('tabbrowser-strip' == TB3), 'tabbrowser-strip']);
      }
      var RadBox = Cb.radioboxDialog(button, selArr, selTtl, selLbl, null, null,"Apply", "Cancel");
      if (RadBox) {
          for (var j = 0; j < selArr.length; j++) {
            for(var k = 0; k < selArr[j].length; k++) {
              if (selArr[j][k][1]) {
                if (j > 0)
                  str += ",";
                str += selArr[j][k][2];
              }
            }
          }
          return str;
      }
      else {
        if (GetPrefs())
          return TB1+","+TB2+","+TB3;
        else
          return "";
      }
    }
    function chooseTB() {
      GetPrefs();
      var TBs = listToolbars();
      Cb.setPrefs(prefstring,TBs);
      GetPrefs();
    }
    function toggleTabBar(collapsed) {
      gBrowser.setStripVisibilityTo(!(collapsed));
      Cb.setPrefs(tabbarprefstring, !(collapsed));
      return collapsed;
    }
    function toggleTB(toolbar) {
      if (toolbar != null) {
        if (toolbar != 'tabbrowser-strip') {
          if (toolbar != button.parentNode.id || ((toolbar == 'status-bar') && (button.parentNode.id != 'tt-toolbar-statusbar1') && (button.parentNode.id != 'tt-toolbar-statusbar2')))
            document.getElementById(toolbar).collapsed = !document.getElementById(toolbar).collapsed;
          return document.getElementById(toolbar).collapsed;
        } else {
    	  if ((button.parentNode.id != 'tt-toolbar-tabright') && (button.parentNode.id != 'tt-toolbar-tableft'))
    		return (toggleTabBar(Cb.getPrefs(tabbarprefstring)));
        }
      }
      else
        return false;
    }
    function toggleAll() {
      if (GetPrefs()) {
        GetStates();
        Cb.setPrefs(statepref,toggleTB(TB1)+","+toggleTB(TB2)+","+toggleTB(TB3));
      }
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt) 
    {
      if (GetPrefs()) {
        GetStates();
        Cb.setPrefs(statepref,toggleTB(TB1)+","+State2+","+State3);
      }
    }
    this.midclick = function(evt) 
    {
      if (GetPrefs()) {
        GetStates();
        Cb.setPrefs(statepref,State1+","+toggleTB(TB2)+","+State3);
      }
    }
    this.rightclick = function(evt)
    {
      if (GetPrefs()) {
        GetStates();
        Cb.setPrefs(statepref,State1+","+State2+","+toggleTB(TB3));
      }
    }
    this.aleftclick = function(evt)
    {
      toggleAll();
    }
    this.leftDclick = function(evt)
    {
      chooseTB();
    }
    // ***** INITIALISATION ***** //
    if (GetPrefs()) {
      GetStates(); 
      if (TB1 != null && (TB1 != button.parentNode.id || ((TB1 == 'status-bar') && (button.parentNode.id != 'tt-toolbar-statusbar1') && (button.parentNode.id != 'tt-toolbar-statusbar2'))))
        if (TB1 != 'tabbrowser-strip')
          document.getElementById(TB1).collapsed = State1;
        else
    	  if ((TB1 != 'tt-toolbar-tabright') && (TB1 != 'tt-toolbar-tableft'))
    		toggleTabBar(State1);
      if (TB2 != null && (TB2 != button.parentNode.id || ((TB2 == 'status-bar') && (button.parentNode.id != 'tt-toolbar-statusbar1') && (button.parentNode.id != 'tt-toolbar-statusbar2'))))
        if (TB2 != 'tabbrowser-strip')
          document.getElementById(TB2).collapsed = State2;
        else
    	  if ((TB2 != 'tt-toolbar-tabright') && (TB2 != 'tt-toolbar-tableft'))
    		toggleTabBar(State2);
      if (TB3 != null && (TB3 != button.parentNode.id || ((TB3 == 'status-bar') && (button.parentNode.id != 'tt-toolbar-statusbar1') && (button.parentNode.id != 'tt-toolbar-statusbar2'))))
        if (TB3 != 'tabbrowser-strip')
          document.getElementById(TB3).collapsed = State3;
        else
    	  if ((TB3 != 'tt-toolbar-tabright') && (TB3 != 'tt-toolbar-tableft'))
    		toggleTabBar(State3);
    }
    this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot
    this.setAttribute('ondblclick', 'gQuot(event, this)');
    // ***** ATTRIBUTES ***** //
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    this.setAttribute('author','rawny, cblover, nicholas, jet-plane, beerman');
    this.setAttribute('version','10');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toolbar-toggler2.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toolbar-toggler2.html');

    Help Tab

    Double click the button to see 3 lists of your toolbars in a radio button dialogue.
    The top list allows you to choose which toolbar is toggled by left clicking the button, 
    the middle list allows you to choose which toolbar is toggled by middle clicking the button
    and the bottom list allows you to choose which toolbar is toggled by right clicking the button.
    (After setting the toolbars, Alt+L will toggle all of the chosen ones at once.)
    If you click cancel on the dialogue it will leave the button toggling the toolbars it was toggling previously for each click (even if it was toggling nothing).
  550. Toolbars-NP

    Code Tab

    /*CODE*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      const toolbar = document.getElementById("nav-bar");
      toolbar.collapsed = !toolbar.collapsed;
    };
    this.cleftclick = function(evt)
    {
      this.midclick(evt);
    };
    this.midclick = function(evt)
    {
      const toolbar2 = document.getElementById("PersonalToolbar");
      toolbar2.collapsed = !toolbar2.collapsed;
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','newf, SCClockDr');
    this.setAttribute('version','20061104.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toolbar-toggle-button-lite-group.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText += '\n L\tNav Bar\n M\tPersonal Bar\nR\tContext Menu';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

  551. Toolbars-NSP

    Code Tab

     

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('...')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      const toolbar = document.getElementById("nav-bar");
      toolbar.collapsed = !toolbar.collapsed;
    };
    this.cleftclick = function(evt)
    {
      this.midclick(evt);
    };
    this.midclick = function(evt)
    {
      const toolbar1 = document.getElementById("status-bar");
      toolbar1.collapsed = !toolbar1.collapsed;
    };
    this.rightclick = function(evt)
    {
      const toolbar2 = document.getElementById("PersonalToolbar");
      toolbar2.collapsed = !toolbar2.collapsed;
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','newf, SCClockDr');
    this.setAttribute('version','20061104.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/toolbar-toggle-button-lite-group.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText += '\n L\tNav Bar\n R\tPersonal Bar\n M\tStatus Bar';
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

  552. Tools

    Code Tab

    /*Code*/

    Initialization Tab

    /*
    ToDo: Localizations of menu items
    20100307.00 Added "Work offline" to Tools button
    20100307.00 superfluous code deleted
    20100306.00 some minor bugs fixed
    20100306.00 Fixed bugs in "show menu bar". Added checkboxes to it
    20100304.00 "Default Menu bar hide/show" option (like in Internet Explorer 7/8) added.
    */
    var bar = document.getElementById('main-menubar');
    var mPopid = this.id+'cb2ChromiumButtons',mPopup = this.appendChild(document.createElement("menupopup"));
    mPopup.setAttribute('id',mPopid);
    var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
    if(prefs.getBoolPref("custombuttons.menubar.hidden"))
    {
      document.getElementById('toolbar-menubar').setAttribute('hidden', 'true');
      prefs.setBoolPref('custombuttons.menubar.hidden', true);
    }
    else
    {
      document.getElementById('toolbar-menubar').setAttribute('hidden', 'false');
      prefs.setBoolPref('custombuttons.menubar.hidden', false);
    }
    this.initBtn = function() {
      var mBarItems = bar.childNodes;
      var prefs = Cc['@mozilla.org/preferences-service;1'].getService(Ci.nsIPrefBranch);
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Show menu bar");
        mItem.setAttribute("type", "checkbox");
        mItem.setAttribute("oncommand", "var prefs = Cc['@mozilla.org/preferences-service;1'].getService(Ci.nsIPrefBranch);if(prefs.getBoolPref('custombuttons.menubar.hidden')==true){document.getElementById('toolbar-menubar').setAttribute('hidden', 'false');prefs.setBoolPref('custombuttons.menubar.hidden', false);}else{document.getElementById('toolbar-menubar').setAttribute('hidden', 'true');prefs.setBoolPref('custombuttons.menubar.hidden', true);}");
        if(prefs.getBoolPref('custombuttons.menubar.hidden')==true){
          mItem.setAttribute("checked", "false");
        }
        else{
          mItem.setAttribute("checked", "true");
        }
        var separator = document.getElementById(mPopid).appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + 1;
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "New tab");
        mItem.setAttribute("command", "cmd_newNavigatorTab");
        mItem.setAttribute("key", "key_newNavigatorTab");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "New window");
        mItem.setAttribute("command", "cmd_newNavigator");
        mItem.setAttribute("key", "key_newNavigator");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Private browsing");
        mItem.setAttribute("command", "Tools:PrivateBrowsing");
        mItem.setAttribute("key", "key_privatebrowsing");
        var separator = document.getElementById(mPopid).appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + 1;
    /*  if(mBarItems[i].id == 'history-menu') {
    */
    /*
      for(i=0;i<mBarItems.length;i++) {
        if(mBarItems[i].nodeName == 'menu') {
          if(mBarItems[i].id == 'bookmarksMenu') {
          var mBarClone = mBarItems[i].cloneNode(true);
          document.getElementById(mPopid).appendChild(mBarClone);
          }
        }
      }
    */
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "History");
        mItem.setAttribute("command", "Browser:ShowAllHistory");
        mItem.setAttribute("key", "showAllHistoryKb");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Bookmark manager");
        mItem.setAttribute("command", "Browser:ShowAllBookmarks");
        mItem.setAttribute("key", "manBookmarkKb");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Downloads");
        mItem.setAttribute("command", "Tools:Downloads");
        mItem.setAttribute("key", "key_openDownloads");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Add-ons");
        mItem.setAttribute("command", "Tools:Addons");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Keyword manager");
        mItem.setAttribute("oncommand", "openDialog('data:application/vnd.mozilla.xul+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KCjwhLS0gKioqKiogQkVHSU4gTElDRU5TRSBCTE9DSyAqKioqKgogICAtIFZlcnNpb246IE1QTCA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x0aXB0ZXh0PSJDbGVhciBGaWx0ZXIiCiAgICAgICAgICAgICAgb25jb21tYW5kPSJLV00uY2xlYXJGaWx0ZXIoKTsiIAogICAgICAgICAgICAgIGRpc2FibGVkPSJ0cnVlIiAvPgogICAgPC9oYm94PgoKICAgIDxzcGFjZXIgLz4KCiAgICA8dHJlZSBpZD0ia3dtLXRyZWUiIGZsZXg9IjEiIHJvd3M9IjEwIiBoaWRlY29sdW1ucGlja2VyPSJ0cnVlIgogICAgICAgICAgc2VsdHlwZT0ic2luZ2xlIiAKICAgICAgICAgIG9uZGJsY2xpY2s9IktXTS5kb3VibGVjbGljayhldmVudCk7IiA+CiAgICAgIDx0cmVlY29scz4KICAgICAgICA8dHJlZWNvbCBpZD0ia3dtLXRyZWVjb2wtbmFtZSIgbGFiZWw9Ik5hbWUiIGZsZXg9IjQiIC8+CiAgICAgICAgPHRyZWVjb2wgaWQ9Imt3bS10cmVlY29sLWtleXdvcmQiIGxhYmVsPSJLZXl3b3JkIiAKICAgICAgICAgICAgICAgICBmbGV4PSIyIiAvPgogICAgICAgIDx0cmVlY29sIGlkPSJrd20tdHJlZWNvbC1pZCIgbGFiZWw9IklkIiBmbGV4PSIyIiBoaWRkZW49InRydWUiIC8+CiAgICAgIDwvdHJlZWNvbHM+CiAgICAgIDx0cmVlY2hpbGRyZW4gLz4KICAgIDwvdHJlZT4KCiAgPC92Ym94PgoKPC9kaWFsb2c+Cg==', 'kwm', 'chrome, dialog=no, centerscreen');");
        var separator = document.getElementById(mPopid).appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + 1;
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Clear Recent History...");
        mItem.setAttribute("oncommand", "Cc['@mozilla.org/browser/browserglue;1'].getService(Ci.nsIBrowserGlue).sanitize(window);");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Options...");
        mItem.setAttribute("oncommand", "openPreferences();");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Check for updates");
        mItem.setAttribute("oncommand", "checkForUpdates();");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "About");
        mItem.setAttribute("oncommand", "openAboutDialog();");
        var separator = document.getElementById(mPopid).appendChild(document.createElement("menuseparator"));
        separator.id = "browser-manipulator-button-separator" + 1;
    /*    var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Minimize");
        mItem.setAttribute("oncommand", "window.minimize();");
        mItem.setAttribute("tooltiptext", "Minimize");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Maximize");
        mItem.setAttribute("oncommand", "document.documentElement.getAttribute('sizemode') == 'maximized' ? window.restore() : window.maximize();");
    */
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Work offline");
        mItem.setAttribute("type", "checkbox");
        mItem.setAttribute("oncommand", "BrowserOffline.toggleOfflineStatus();");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Restart browser");
        mItem.setAttribute("oncommand", restart);
        mItem.setAttribute("tooltiptext", "Restart browser");
        var mItem = document.getElementById(mPopid).appendChild(document.createElement("menuitem"));
        mItem.setAttribute("label", "Exit");
        mItem.setAttribute("command", "cmd_quitApplication");
    /*<menuitem id="goOfflineMenuitem"
                              label="&goOfflineCmd.label;" accesskey="&goOfflineCmd.accesskey;" 
                              type="checkbox" oncommand="BrowserOffline.toggleOfflineStatus();"/>
    */
    }
    setTimeout(this.initBtn, 1000);
    // Our two images, labeled correspondingly
    var imgOpen = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAATCAYAAACDW21BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF3GlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHja7V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/hkYnJm9HumZGRkdkvPq9P2mkWDeQFEF+CLQHzNj9Reaq/MxYxJJ2GchM0ACgEirIHo9GmRgC3jp346t6jZWHufXkH7rsI4Fp6adr46N8BERcEqYReMK47yzMZjTYdB3BbRGbXa1ooAPENGzfcFhoUCEgNh8sx1xf7ugFAdGkqrFuQdJGMPL/zraai/H1t25+p/YbkNpJeklKxbZ+5OK7WHZpDspRkLskUkrL1qfWHyYOe+P8NAE7RvhpdR8s/AAAAAElFTkSuQmCC';
    // toggles the image to Open State
    this.toggleImgOpen = function() {
    //    this.setAttribute("image",imgOpen);
    }
    // latter
    this.toggleImgClosed = function() {
    //  this.setAttribute("image",imgClosed);
    }
    var that = this;
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 10);
      }
    }
    this.hideDropMarker();
    this.type="menu";
    this.image = imgClosed; // make sure it initializes with the correct image
      // START RESTART
      var restart = 
        "if (gBrowser.warnAboutClosingTabs(\"All\")) { // Idea from _pi Thanks!\n" +
        "  var appStartup = Components.classes[\"@mozilla.org/toolkit/app-startup;1\"].getService(Components.interfaces.nsIAppStartup);\n" +
        "  appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);\n" +
        "} // End if (gBrowser.warnAboutClosingTabs(\"All\"))\n";
      // END RESTART
    // BUTTON ATTRIBUTES
    this.setAttribute("onmouseover", "this.hideDropMarker(); this.toggleImgOpen();");
    this.setAttribute("onmouseout", "this.toggleImgClosed();" );
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("author",'Eleon');
    this.setAttribute("version",'20090307.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/google-chrome-two-buttons-page-and-tools.html');
    this.setAttribute("dependency",'FF 3.0.*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);

    Help Tab

  553. Tools Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='tools-menu';
    document.getElementById(menuName).setAttribute('collapsed','true');
    this.initBtn = function() {
      var menuNode=document.getElementById(menuName).firstChild,menuClon=menuNode.cloneNode(true),mPopid=num+'cb2mBar-'+menuName,mPopup=that.appendChild(menuClon).firstChild;
    }
    setTimeout(this.initBtn, 5000);
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 10);
      }
    }
    this.hideDropMarker();
    this.type="menu";
    // BUTTON ATTRIBUTES
    this.setAttribute("onmouseover", "this.hideDropMarker();");
    this.setAttribute("class", "menu-iconic");
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081125.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  554. Top, Bottom and Middle All In One

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
      if (content.scrollY > 0) {
        content.scrollTo(0, 0);
      } else {
        content.scrollTo(0, content.document.height);
      }
    }
    this.rightclick = function(e) {
      content.scrollTo(0, (content.document.height - content.innerHeight)/2);
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Go Top/Bottom|R: Go Middle|M: Go Menu";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080923.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/top-bottom-and-middle-all-one.html');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);

    Help Tab

    L: Go Bottom/Top
    R: Go Middle
    M: Context Menu
  555. Top, Bottom and Middle All In One²

    Code Tab

    /*代码*/

    Initialization Tab

    /*Initialization code*/
    this.leftclick = function(e) {
        content.scrollTo(0, 0);
    } 
    this.rightclick = function(e) {
      content.scrollTo(0, content.document.height);
    }
    this.midclick = function(e) {
      content.scrollTo(0, (content.document.height - content.innerHeight)/2);
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: Go Top|R: Go Bottom|M: Go Middle";
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20091230.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/top-bottom-and-middle-all-one.html');
    this.setAttribute('public',true);

    Help Tab

  556. Top/Bottom of Page by Arthur

    Code Tab

    this.scroll(1);
    

    Initialization Tab

    this.scroll=function(t) {
    	var w=document.getElementById("content").contentWindow;
    	if (w)
    	{
    		this.focus(); //simple trick, to leave a probably focused inputbox
    		w.focus();
    		var c="cmd_scrollLeft";
    		if (t==2)
    			c="cmd_scrollRight";
    		else
    			if (t==1)
    				goDoCommand("cmd_scrollBottom");
    			else
    				goDoCommand("cmd_scrollTop");
    		//20 should be great enough, until anybody found a scroll(Left|Right)Most
    		for (var i=1; i<20; i++)
    			goDoCommand(c);
    	}
    }
    this.setAttribute("onclick","if (event.button==1) this.scroll(0);");
    this.setAttribute("ondblclick","if (event.button==0) this.scroll(2);");
    this.tooltipText="scroll M=Top|L=Bottom|dL=Bottom,Right";
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/topmiddlebottom-page-button-group.html');

    Help Tab

  557. Tor and Proxy Switcher

    Code Tab

    /*Code*/

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('...')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      switch(this.PS.getIntPref(this.p_type))
      {
      	case 0:
      	 this.PS.setIntPref(this.p_type, 1);
      	 this.PS.setIntPref(this.p_port, 8118);
      	 this.PS.setCharPref(this.p_serv, "localhost");
      	 this.PS.setBoolPref(this.p_share, true);
      	 break;
      	case 1:
      	 this.PS.setIntPref(this.p_type, 2);
      	 this.PS.setIntPref(this.p_port, 0);
      	 this.PS.setCharPref(this.p_serv, "");
      	 this.PS.setBoolPref(this.p_share, true);
      	 break;
      	case 2:
      	 this.PS.setIntPref(this.p_type, 0);
      	 this.PS.setIntPref(this.p_port, 0);
      	 this.PS.setCharPref(this.p_serv, "");
      	 this.PS.setBoolPref(this.p_share, true);
      	 break;
      }
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    this.p_type="network.proxy.type";
    this.p_port="network.proxy.http_port";
    this.p_serv="network.proxy.http";
    this.p_share="network.proxy.share_proxy_settings"
    this.setState=function(){
      switch(this.PS.getIntPref(this.p_type))
      {
      case 0:
       this.image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEX/AP//b3AAAADMg0R3AAAAAXRSTlMAQObYZgAAAEhJREFUeF5lxLEJgDAQhtGPdLdBask12cQBfjmszk1SibXgCELGdACbB30CHj/6u09cCkxKFumiPVvFPJKyHgPuE2gVsATK4AMjPg2en2H01AAAAABJRU5ErkJggg==";
       this.tooltipText="Direct Connection";
       break;
      case 1:
       this.image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEX/AP9v/3AAAAAA43UkAAAAAXRSTlMAQObYZgAAAEhJREFUeF5lxLEJgDAQhtGPdLdBask12cQBfjmszk1SibXgCELGdACbB30CHj/6u09cCkxKFumiPVvFPJKyHgPuE2gVsATK4AMjPg2en2H01AAAAABJRU5ErkJggg==";
       this.tooltipText="Manual Proxy";
       break;
      case 2:
       this.image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEX/AP/v7wAAAAAVjFbiAAAAAXRSTlMAQObYZgAAAEhJREFUeF5lxLEJgDAQhtGPdLdBask12cQBfjmszk1SibXgCELGdACbB30CHj/6u09cCkxKFumiPVvFPJKyHgPuE2gVsATK4AMjPg2en2H01AAAAABJRU5ErkJggg==";
       this.tooltipText="Automatic Proxy";
       break;
      }
    }
    this.PS=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
    this.ob={};
    this.ob.observe=this.setState.bind(this);
    this.PS.addObserver(this.p_type,this.ob,false);
    this.setState();
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','Danshi, SCClockDr');
    this.setAttribute('version','20090225.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/tor-and-proxy-switcher.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

  558. two mouse events demo

    Code Tab

    /*Code*/
    this.listalert(event);
    this.togglecheck(event);
    

    Initialization Tab

    /*Initialization code*/
    this.listalert = function(evt)
    {
       if (this.checked == false)
       {
         alert("This is the list")
       }
    }
    // and then...
    this.togglecheck = function(evt)
    {
       if (this.checked == true)
      {
         alert("This is the toggle")
      }
    this.checked = !this.checked
    }
    /*---------------------- Button Code Block End -----------------------*/
    this.setAttribute("author","squeaky");
    this.setAttribute("version","20080328.1");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/demo-buttons-group.html');
    this.setAttribute("dependency","FF2.0*,CB2 2.0.5*");
    this.setAttribute("status","Demo Complete");
    this.setAttribute("public",true)
    

    Help Tab

    %0A/*%20+++-----------------------%20help%20information%20for%20this%20button%20-----------------------+++%20*/%0A%0ANo%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.%0A%0A
  559. Underline

    Code Tab

    /*Code*/
    //==============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    let de = createDebug(this);
    let Cb = custombuttons;
    let prefstring = "extensions.CustomButtons2@cbtnext.org.tagIt.index";
    this.info = '\n\nBBCode: [u]Clipboard[/u]\n\nHTML: <u>Clipboard</u>';
    this.ss = [
    	{ label: 'BBCode', open: '[u]', open1: '[u]%h', close: '[/u]', sItemId: '' },
    	{ label: 'HTML'  , open: '<u>', open1: '<u>%h', close: '</u>', sItemId: '' },
            { label: 'WIKI'  , open: '!!' , open1: '!!%h' , close: '!!'  , sItemId: '' }];
    var sPromptString = 'Clipboard is empty.\nInsert text to quote:\n\t(Any Highlighted text will be overwritten)';
    var sPromptTitle  = 'Quote this text';
    var sGroupTag     = 'tagItItal';
    /*----------------- Custom Buttons2 Mouse Handler ------------------
    	Remove the un-necessary Functions within this code block
    	or the entire code block for very simple left click buttons.
    		Replace the function call "Msg.aMsg('???????')"
    		within each needed Click Function with
    		the function call of your choice.
    		Your function call will then execute.
    		Access to the click event Object (evt)
    		provides you full control.
    --------------------------------------------------------------------*/
    let Cb2s = cb2String;
    this.leftclick = function(evt)
    {
      this.doLeft(evt);
    };
    this.midclick = function(evt)
    {
      this.doMid(evt);
    };
    this.cmidclick = function(evt)
    {
      this.doMid(evt);
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    this.intro = {
    	index 		: 0,
    	listo 		: '',
    	liste 		: '',
    	listc		: '',
    	theBox		: {},
    	startPos 	: 0,
    	endPos 		: 0,
    	oPosition 	: 0,
    	oHeight 	: 0,
    	text		: '',
    	nHeight		: 0,
    	Highlight	: '',
    	eBlock		: '',
    	cBoard		: '',
    	n		: '',
    	initMeth	: function( oBtn ){
    				this.index	= Number(Cb.getPrefs( prefstring ));
    				this.listo 	= oBtn.ss[this.index].open;
    				this.liste 	= oBtn.ss[this.index].open1;
    				this.listc	= oBtn.ss[this.index].close;
    				this.theBox	= document.commandDispatcher.focusedElement;
    				if ( this.theBox ) {
    					this.startPos 	= this.theBox.selectionStart;
    					this.endPos 	= this.theBox.selectionEnd;
    					this.oPosition 	= this.theBox.scrollTop;
    					this.oHeight 	= this.theBox.scrollHeight;
    					this.text	= this.theBox.value.substring(0,this.startPos);
    					this.nHeight	= this.theBox.scrollHeight - this.oHeight;
    					this.Highlight	= this.theBox.value.substring(this.startPos, this.endPos);
    					this.eBlock	= this.theBox.value.substring(this.endPos, this.theBox.value.length);
    					this.cBoard	= gClipboard.read();
    					this.n		= '';
    					return true;
    				} // End if ( this.theBox )
    				return false;
    			} // End initMeth
    };
    this.doLeft = function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.Highlight) {	// THEBOX CONTAINS NOTHING HIGHLITED.
    		switch(this.pref){
    		case 1:
    			x.text += x.listc + x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listc.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=0;
    			this.checked=false;
    			break;
    		case 0:
    			x.text += x.listo;
    			x.text += x.eBlock;
    			x.theBox.value = x.text;
    			x.theBox.selectionStart = x.theBox.selectionEnd = x.endPos + x.listo.length;
    			x.theBox.scrollTop = x.oPosition + x.nHeight;
    			this.pref=1;
    			this.checked=true;
    			break;
    		}
    	} else {	// THEBOX CONTAINS SOMETHING HIGHLITED.
    		x.n += x.liste.replace(/%h/,x.Highlight)+ x.listc;
    		var nLen = x.n.length;
    		x.text += x.n + x.eBlock;
    		x.theBox.value = x.text;
    		x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    		x.theBox.scrollTop = x.oPosition + x.nHeight;
    	}
    }; // End this.doLeft*/
    this.doMid= function(e){
    	if ( !this.intro.initMeth( this ) ) {
    		return;
    	} // End if ( !this.intro.initMeth( this ) )
    	var x = this.intro;
    	if (!x.cBoard) {
    		alert('Middle-click expects the Clipboard to contain text to Bold.\n\n'+this.info );
    		return;
    	}
    	x.n += x.liste.replace(/%h/,x.cBoard)+ x.listc;
    	var nLen = x.n.length;
    	x.text += x.n;
    	x.theBox.value = x.text + x.eBlock;
    	x.theBox.selectionStart = x.theBox.selectionEnd = x.startPos+nLen;
    	x.theBox.scrollTop = x.oPosition + x.nHeight;
    }; // End this.doMid
    //===========DETERMINES WHICH OPTION IS SELECTED IN CONTEXT MENU===========
    this.getIndex = function() {
    	let ssIdx = Cb.getPrefs( prefstring ,0);
    	let aNodes = this.mObj.getItemsById( 'Note' );
    	for( let i = 0; i < aNodes.length; i++ ) {
    		aNodes[i].setAttribute( "checked", false );
    	}
    	aNodes[ssIdx].setAttribute( "checked", true );
    }; // End this.getIndex( aNode )
    //=========SELECTS THE ACCOUNT IN THE CONTEXT MENU===============
    this.setIndex = function(aNode) {
    	Cb.setPrefs(prefstring, Number(aNode.value));
    }; // End this.setIndex(aNode)
    this.mObj = Cb.getCbContextObj(this);
    this.init = function (x)
    {
    	x.mObj.listener = function(x){x.getIndex();};
    	x.mObj.setSub();
    	var nItem = {}, mItem = {};
    	document.getElementById(CB2const.sCBCtxtMenu).setAttribute("oncommand", "event.stopPropagation()");
    	for(var i in x.ss) {
    		nItem = new x.mObj.getItem();
    		nItem.id = 'Note';
    		nItem.label = x.ss[i].label;
    		nItem.value = String(i);
    		nItem.checked = false;
    		// nItem.oncommand = Cb.gMyPrn('erty'+x.id);
    		mItem = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    		this.ss[i].sItemId = mItem.id;
    		mItem.setAttribute( 'oncommand','document.popupNode.setIndex(this);' )
    		mItem.setAttribute( 'type','checkbox')
    		mItem.setAttribute( 'checked',false)
    		mItem.setAttribute( 'autocheck',false )
    	} // End for(var i in this.ss)
    	x.mObj.getItem();
    	nItem = x.mObj.getItem();
    	nItem.id = 'Note';
    	this.separator = x.mObj.insertBefore( nItem , x.mObj.oMenu.lastChild);
    }
    this.init(this);
    this.getIndex(this);
    //=======FUNCTION TO SHOW EMAIL ADDY IN TOOLTIP ON MOUSEOVER========
    this.toolTip = function(aIndex, aSelect) {
    	this.tooltipText = Cb.getNumber( this.id ) + ':' + this.ss[aIndex].label+' '+this.label + " \n L=Normal \n M=Clipboard \n R=Context";
            this.getIndex(this);
    }; // End this.toolTip = function(aIndex, aSelect)
    //=======END TOOLTIP FUNCTION=======================================
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'var index = custombuttons.getPrefs("' + prefstring + '",0); this.toolTip(index); custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author',' m435tr0d, SCClockDr');
    this.setAttribute('version','20090209.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/bbcode-text-format-group.html');
    this.setAttribute('dependency','FF 2.0.*, CB2 2.0.5.4b06*');
    this.setAttribute('status','Completed');
    this.setAttribute('public',true);
    this.pref=0;
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    **************************************************************
     L = IF text is highlighted:
       BBCode: [u]Highlighted[/u]
       HTML: <u>Highlighted</u>
       WIKI: !!Highlighted!!
       OR nothing highlighted
         First click = [u], <u>, or !!
         Second click = [/u], </u>, or !!
     M =
       BBCode: [u]Clipboard[/u]
       HTML: <u>Clipboard</u>
       WIKI: !!Clipboard!!
     R = Context Menu with tag options and submenu for CB Context
  560. Undo Closed Tab w/TMP

    Code Tab

    /*Code*/
    TMP_ClosedTabs.undoCloseTab();

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons² Extension" );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ----------------------*/
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','jw25, makondo');
    this.setAttribute('version','20080919.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/undo-closed-tab-wtmp.html');
    this.setAttribute('dependency','TabMixPlus');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    /*Help*/%0A%0AThis%20button%20requires%20the%20TabMixPlus%20extension%0A%20%20%20%20%20%20https%3A//addons.mozilla.org/firefox/1122/%0A%0ALeft%20click%20opens%20last%20closed%20tab
  561. Undo/Redo

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.onLeftClick=function()
    {
    	goDoCommand('cmd_undo');
    }
    this.onMiddleClick=function()
    {
    	this.showPopup(this);
    }
    this.onRightClick=function()
    {
    	goDoCommand('cmd_redo');
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	switch(evt.button) 
    	{
    		case 0:
    			this.onLeftClick();
    			break;
    		case 1:
    			this.onMiddleClick();
    			break;
    		case 2:
    			this.onRightClick();
    			break;
    	}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L-Undo | R-Redo | M-Popup";
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/undoredo-button-thunderbird.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    null
  562. UnEscape from Clip

    Code Tab

    /*CODE*/
    var x = unescape(gClipboard.read());
    gClipboard.write(x);

    Initialization Tab

    /*Initialization Code*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20090213.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/unescape-clip.html');
    this.setAttribute('dependency','Fx 2.0.0.4 - 3.2a1pre, Tb 2.0.0.19 - Tb 3.0b2pre, Calendar 1.0pre , CB2 2.0.0*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    Help has not been defined for this button
  563. URL Lister

    Code Tab

    document.getElementById('more-tools-menu-URL%20Lister...').click();

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080914.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/url-lister-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No%20help%20developed%20for%20%0A%3Clabel%3E%20button%0Acustombuttons-button%3Cid%3E.
  564. URL-Tools

    Code Tab

    /*
    	URL-Tools 0.5 (19. Aug. 2008)
    	- Go up one or more directory levels in a site
    	- Switch between protocols: http: <=> https: and http:/https: <=> ftp:
    	- Drag and Drop links/files to download the target
    	- Ctrl+Left-click / Middle-click open pages in a new tab
    	- Go to Top/Bottom of the Page
    	- Download embedded files
    	- Find in Google's cache
    	- Find in Archive.org
    	- Show domain information (WhoIs)
    	Compatibility: FF 3.0.*, Flock 1.2.*
    	Credits to Popoki Tom for Search Station 
    	(http://members.lycos.co.uk/toolbarpalette/searchstation/index_en.html) 
    	and Andrew Ruder for Download Embedded 
    	(http://www.aeruder.net/software/extensions/extensionlist.html)
    */

    Initialization Tab

    var pageTopLabel = "Go to Top of This Page";
    var pageBottomLabel = "Go to Bottom of This Page";
    var dwnembedLabel = "Download Embedded Files";
    var dwnembedMessage = "No embedded files were found.";
    var gcacheLabel = "Find in Google's cache";
    var waybackLabel = "Find in Archive.org";
    var whoisLabel = "Show domain information (WhoIs)";
    var tooltipText = "URL-Tools - [Open in New Tab: Ctrl+Left-click / Middle-click]";
    var pageTopImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOC8xMS8wNdiEE10AAAAldEVYdFNvZnR3YXJlAE1hY3JvbWVkaWEgRmlyZXdvcmtzIE1YIDIwMDSHdqzPAAACWElEQVR4nH2TS0iUURiGn3Pmn3+cixqOMygZijBjEma0K0OMCroREbapsK0EEXRZBVoEkrhw0SISWgaF+y4SaoSEUkkZXTTRUrqAlDOOOuP//+e0cG6Bzrv8ODy873u+T4yMfVzYUhLwKK3JSGlIJlNYaxYLf2LSttTfpaXEYZdhfJBSMjX5hRvX2wEwPKbpr49WFZEnrTXJNYVjw/TMHAG/1zc9+3No/sfv0x6PZzj/rWQDCSGQEoRUSJekorKclqaG8rpI9TO3YbSqnFmMjQAaEIBpGszMzvH+2zg1ZTXYljbjscV+pdRloHdTBwBCCqSAKT1B29gpet/08HlyBrPIJJFY7CocAZBCYFuKu1MdjF58yqTxloaG7eyoj2KtJQt3oLXGcRRHH+2n+8RtnOIUvSdvcXX8PIYhcLlchQGWUnQOHKeuqpZt1SEGUwOkShMcbNxH38QFkHpzgOUoDj1opnnPWfa21DHiDKOkYnhliPjWXxw51srzmofZbxev331d3d1QW5S0HARg2Q6lPd71KEoz2NHPk5XHNLp30tZzBa00Go3u1AJAZizYtsJ2FACxa6vMty8ghODF9EsOFDfxamYUgE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Hsa2df+T+8uCuOyIkExg7bbS9m6SriF0vJblRLYt+LBVBLQ0BztdIduCQPplArUwhh/4xCeu4Afh9hB9gGIUbYzeuGW1zlYjOBQaEYcInM7NhL0h4ezb2eTVyzuJUppyVIoB/gCawQbn8DamZwAAAABJRU5ErkJggg==";
    var items = new Array;
    items.push("separator");
    items.push([pageTopLabel, pageTopImg, "goDoCommand('cmd_scrollTop');"]);
    items.push([pageBottomLabel, pageBottomImg, "goDoCommand('cmd_scrollBottom');"]);
    items.push("separator");
    items.push([dwnembedLabel, dwnembedImg, "this.parentNode.hidePopup(); this.parentNode.parentNode.urltools_dwnlEmbed();"]);
    items.push([gcacheLabel, gcacheImg, "http://google.com/search?q=cache:"]);
    items.push([waybackLabel, waybackImg, "http://web.archive.org/web/*/"]);
    items.push([whoisLabel, whoisImg, "http://centralops.net/co/DomainDossier.aspx?addr_lkup=1&dom_whois=1&addr="]);
    /*
    	NO NEED TO EDIT BELOW THIS LINE :-)
    */
    var mPopup = document.createElement("menupopup");
    mPopup.setAttribute("onpopupshowing", "return this.parentNode.showDropDown(event);");
    mPopup.setAttribute("oncommand", "this.parentNode.goUp(event); event.stopPropagation();");
    mPopup.setAttribute("onmouseup", "this.parentNode.goUp(event); event.stopPropagation();");
    mPopup.setAttribute("onclick","this.hidePopup(); event.stopPropagation();");
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.tooltipText = tooltipText;
    //oncommand feuert nur bei Linksklick
    //onmouseup feuert auch auf Dropmarker
    this.setAttribute("oncommand","this.goUp(event); event.stopPropagation();");
    this.setAttribute("onmouseup","this.goUp(event);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragenter","nsDragAndDrop.dragEnter(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.goUp = function(e) {
    	var URLs = this.getURLs(), URL;
    	if(URLs.length == 0) return;
    	URL = (e.target.value) ? URLs[e.target.value] : URLs[0];
    	// mouseup für Mittelklick und Ctrl+Linksklick
    	if(e.type == "mouseup") {
    		if(e.button == 1 || (e.button == 0 && e.ctrlKey)) {
    			gBrowser.selectedTab = gBrowser.addTab(URL);
    		}
    		else {
    			return;
    		}
    	}
    	// command für Linksklick
    	//else if(e.type == "command" && e.target.tagName == "toolbarbutton") {
    	else if(e.type == "command") {
    		getBrowser().contentWindow.location.assign(URL);
    	}
    }
    this.showDropDown = function(e) {
    	// remove any existing entries
    	while(mPopup.hasChildNodes()) {
    		mPopup.removeChild(mPopup.firstChild); 
    	}
    	// create goup entries
    	var URLs = this.getURLs(), m;
    	for(var i = 0; i < URLs.length; i++) {
    		if(URLs[i] == "separator") {
    			mPopup.appendChild(document.createElement('menuseparator'));
    		}
    		else {
    			m = this.genMenuitem(URLs[i], null, null, null);
    			m.setAttribute('value', i);
    			if(i == 0) m.setAttribute('style', 'font-weight: bold;');
    			mPopup.appendChild(m);
    		}
    	}
    	// create extra entries
    	for(var j = 0; j < items.length; j++){
    		if(items[j] == "separator") {
    	 		// kein GoUp mgl. und 2. Separator oder GoUp mgl.
    	 		if((i == 0 && j > 0) || (i != 0)) mPopup.appendChild(document.createElement('menuseparator'));
    	 	}
    	 	else {
    	 		var cmd = items[j] [2];
    	 		if(items[j] [2].indexOf('http://') >= 0 || items[j] [2].indexOf('https://') >= 0) {
    	 		  var theUrl = items[j] [2] + content.location.href;
    	 		  cmd = "if(event.button == 0 && !event.ctrlKey) getBrowser().contentWindow.location.assign('" + theUrl + "'); if(event.button == 1 || (event.button == 0 && event.ctrlKey)) gBrowser.selectedTab = gBrowser.addTab('" + theUrl + "');";
    	 		}
    			//mPopup.appendChild(this.genMenuitem(items[j] [0], items[j] [1], cmd + " event.stopPropagation();"));
    	 		mPopup.appendChild(this.genMenuitem(items[j] [0], items[j] [1], cmd, "event.stopPropagation();"));
    	 	}
    	}
    }
    this.genMenuitem = function(label, img, mouseup, cmd) {
    	var m = document.createElement('menuitem');
    	m.setAttribute('label', label);
    	m.setAttribute('class', 'menuitem-iconic');
    	if(img != null) m.setAttribute('image', img);
    	if(mouseup != null) m.setAttribute('onmouseup', mouseup);
    	if(cmd != null) m.setAttribute('oncommand', cmd);
    	m.tooltipText = label;
    	return m;
    }
    this.getURLs = function() {
    	var URLs=[], loc = getBrowser().contentWindow.location;
    	try {
    		if(loc.protocol == 'about:') return URLs;
    		var path = loc.href;
    		path = path.replace(/^.*:\/\/[^\/]*\//, '');                // strip scheme and host
    		path = path.replace(/\/$/, '');                             // strip trailing slash
    		var host = loc.host;
    		var scheme = loc.protocol+'//';
    		var emptyPath = ('' == path);
    		if(path.indexOf('#') > 0) {                                 // strip hash
    			path = path.replace(/#.*/, '');
    			URLs[URLs.length] = scheme + host + '/' + path;
    		}
    		if(path.indexOf('?') > 0) {                                 // strip querystring
    			path = path.replace(/\?.*/, '');
    			URLs[URLs.length] = scheme + host + '/' + path;
    		}
    		while(path.indexOf('/') > 0) {                              // strip files/directories
    			path = path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length] = scheme + host + '/' + path + '/';
    		}
    		// host only
    		if(!emptyPath) URLs[URLs.length] = scheme + host + '/';     
    		if(!host.match(/([0-9]+\.)+/) && loc.protocol != "ftp:") {  // strip subdomains (not IP and not ftp)
    			var hostSuff = host.substr(host.length - 6);
    			host = host.substr(0, host.length - 6);
    			while(-1 != host.indexOf('.')) {
    				host = host.replace(/[^.]*\./, '');
    				URLs[URLs.length] = scheme + host + hostSuff + '/';
    			}
    		}
    		// http: => https:
    		if(loc.protocol == "http:") {
    			if(URLs.length > 0) URLs[URLs.length] = "separator";
    			var path = loc.href.substring(7, loc.href.length);
    			URLs[URLs.length] = "https://" + path;
    		}
    		// https: => http:
    		if(loc.protocol == "https:") {
    			if(URLs.length > 0) URLs[URLs.length] = "separator";
    			var path = loc.href.substring(8, loc.href.length);
    			URLs[URLs.length] = "http://" + path;
    		}
    		// http: u. https: => ftp:
    		if(!host.match(/([0-9]+\.)+/) && (loc.protocol == "http:" || loc.protocol == "https:")) {
    			host = loc.host;
    			var tld = host.substring(host.lastIndexOf('.'), host.length);
    			var domain = host.substring(0, host.lastIndexOf('.'));
    			if(domain.indexOf('.') != -1) domain = domain.substring(domain.lastIndexOf('.') + 1, domain.length);
    			URLs[URLs.length] = "ftp://ftp." + domain + tld;
    		}
    		// ftp: => http: u. https:
    		if(loc.protocol == "ftp:") {
    			if(URLs.length > 0) URLs[URLs.length] = "separator";
    			host = loc.host;
    			var tld = host.substring(host.lastIndexOf('.'), host.length);
    			var domain = host.substring(0, host.lastIndexOf('.'));
    			if(domain.indexOf('.') != -1) domain = domain.substring(domain.lastIndexOf('.') + 1, domain.length);
    			URLs[URLs.length] = "http://" + domain + tld;
    			URLs[URLs.length] = "http://www." + domain + tld;
    		}
    	} catch(e) { }
    	return URLs;
    }
    this.urltools_getDocuments = function(frame, documentList) {
    	const framesList = frame.frames;
    	documentList.push(frame.document);
    	for(var i = 0; i < framesList.length; i++) {
    		this.urltools_getDocuments(framesList[i], documentList);
    	}
    	return documentList;
    }
    this.urltools_dwnlEmbed = function() {
    	var docs = this.urltools_getDocuments(content, new Array());
    	var count = 0;
    	for(var j = 0; j < docs.length; j++) {
    		var embeds = docs[j].getElementsByTagName("embed");
    		for(var k = 0; k < embeds.length; k++) {
    			count++;
    			var url = makeURLAbsolute(docs[j].baseURI, embeds[k].src);
    			saveURL(url, "");
    		}
    	}
    	if (count == 0) {
    		alert(dwnembedMessage);
    	}
    }
    this.setAttribute("author",'eXXile');								// Stores Author.
    this.setAttribute("version",'0.5');                                                 		// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/url-tools.html');		// Stores HomePage.
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

  565. URL-Tools

    Code Tab

    /*
    	URL-Tools 0.5 (19. Aug. 2008)
    	- Go up one or more directory levels in a site
    	- Switch between protocols: http: <=> https: and http:/https: <=> ftp:
    	- Drag and Drop links/files to download the target
    	- Ctrl+Left-click / Middle-click open pages in a new tab
    	- Go to Top/Bottom of the Page
    	- Download embedded files
    	- Find in Google's cache
    	- Find in Archive.org
    	- Show domain information (WhoIs)
    	Compatibility: FF 3.0.*, Flock 1.2.*
    	Credits to Popoki Tom for Search Station 
    	(http://members.lycos.co.uk/toolbarpalette/searchstation/index_en.html) 
    	and Andrew Ruder for Download Embedded 
    	(http://www.aeruder.net/software/extensions/extensionlist.html)
    */

    Initialization Tab

    var pageTopLabel = "Go to Top of This Page";
    var pageBottomLabel = "Go to Bottom of This Page";
    var dwnembedLabel = "Download Embedded Files";
    var dwnembedMessage = "No embedded files were found.";
    var gcacheLabel = "Find in Google's cache";
    var waybackLabel = "Find in Archive.org";
    var whoisLabel = "Show domain information (WhoIs)";
    var tooltipText = "URL-Tools - [Open in New Tab: Ctrl+Left-click / Middle-click]";
    var pageTopImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOC8xMS8wNdiEE10AAAAldEVYdFNvZnR3YXJlAE1hY3JvbWVkaWEgRmlyZXdvcmtzIE1YIDIwMDSHdqzPAAACWElEQVR4nH2TS0iUURiGn3Pmn3+cixqOMygZijBjEma0K0OMCroREbapsK0EEXRZBVoEkrhw0SISWgaF+y4SaoSEUkkZXTTRUrqAlDOOOuP//+e0cG6Bzrv8ODy873u+T4yMfVzYUhLwKK3JSGlIJlNYaxYLf2LSttTfpaXEYZdhfJBSMjX5hRvX2wEwPKbpr49WFZEnrTXJNYVjw/TMHAG/1zc9+3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TH1bvjj/tExFqoWkApRRag9IOT1n27ynS13t037GeQ88fPJ6+UPvXkEAABQTTI/RM9eM9GkDuHefkp8thVFx/ePX62MiuBAC8voYsPQFgMzwAQFO8wmByk3J5fRTAb2gBkIX7ANjhOUSaWfm9zMGJfjrNImJ6/2OhWgAvRI6cY72iWc0XKJuQuKkLgM7cptpVgQ3aKV+cx1qLSyxhGKA05CrLABTSVmmowKSOSsWQusyM9hS+p+maHAAg6TiFFb/OgsoKqyYlNilxYlFAGGqCwCMIfDpenEebCBe0EfWNo5TaIajJsNZhs7YoT21xK/z8e7zSD0SHrA5NkaVkh8DVTV4DStU9avB/zQBQOnMbpdRW9zoF/4Nr78G1Hsa2df+T+8uCuOyIkExg7bbS9m6SriF0vJblRLYt+LBVBLQ0BztdIduCQPplArUwhh/4xCeu4Afh9hB9gGIUbYzeuGW1zlYjOBQaEYcInM7NhL0h4ezb2eTVyzuJUppyVIoB/gCawQbn8DamZwAAAABJRU5ErkJggg==";
    var items = new Array;
    items.push("separator");
    items.push([pageTopLabel, pageTopImg, "goDoCommand('cmd_scrollTop');"]);
    items.push([pageBottomLabel, pageBottomImg, "goDoCommand('cmd_scrollBottom');"]);
    items.push("separator");
    items.push([dwnembedLabel, dwnembedImg, "this.parentNode.hidePopup(); this.parentNode.parentNode.urltools_dwnlEmbed();"]);
    items.push([gcacheLabel, gcacheImg, "http://google.com/search?q=cache:"]);
    items.push([waybackLabel, waybackImg, "http://web.archive.org/web/*/"]);
    items.push([whoisLabel, whoisImg, "http://centralops.net/co/DomainDossier.aspx?addr_lkup=1&dom_whois=1&addr="]);
    /*
    	NO NEED TO EDIT BELOW THIS LINE :-)
    */
    var mPopup = document.createElement("menupopup");
    mPopup.setAttribute("onpopupshowing", "return this.parentNode.showDropDown(event);");
    mPopup.setAttribute("oncommand", "this.parentNode.goUp(event); event.stopPropagation();");
    mPopup.setAttribute("onmouseup", "this.parentNode.goUp(event); event.stopPropagation();");
    mPopup.setAttribute("onclick","this.hidePopup(); event.stopPropagation();");
    this.appendChild(mPopup);
    this.type = "menu-button";
    this.tooltipText = tooltipText;
    //oncommand feuert nur bei Linksklick
    //onmouseup feuert auch auf Dropmarker
    this.setAttribute("oncommand","this.goUp(event); event.stopPropagation();");
    this.setAttribute("onmouseup","this.goUp(event);");
    this.setAttribute("ondragdrop","nsDragAndDrop.drop(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragover","nsDragAndDrop.dragOver(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragenter","nsDragAndDrop.dragEnter(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.setAttribute("ondragexit","nsDragAndDrop.dragExit(event, DownloadsButtonDNDObserver); event.stopPropagation();");
    this.goUp = function(e) {
    	var URLs = this.getURLs(), URL;
    	if(URLs.length == 0) return;
    	URL = (e.target.value) ? URLs[e.target.value] : URLs[0];
    	// mouseup für Mittelklick und Ctrl+Linksklick
    	if(e.type == "mouseup") {
    		if(e.button == 1 || (e.button == 0 && e.ctrlKey)) {
    			gBrowser.selectedTab = gBrowser.addTab(URL);
    		}
    		else {
    			return;
    		}
    	}
    	// command für Linksklick
    	//else if(e.type == "command" && e.target.tagName == "toolbarbutton") {
    	else if(e.type == "command") {
    		getBrowser().contentWindow.location.assign(URL);
    	}
    }
    this.showDropDown = function(e) {
    	// remove any existing entries
    	while(mPopup.hasChildNodes()) {
    		mPopup.removeChild(mPopup.firstChild); 
    	}
    	// create goup entries
    	var URLs = this.getURLs(), m;
    	for(var i = 0; i < URLs.length; i++) {
    		if(URLs[i] == "separator") {
    			mPopup.appendChild(document.createElement('menuseparator'));
    		}
    		else {
    			m = this.genMenuitem(URLs[i], null, null, null);
    			m.setAttribute('value', i);
    			if(i == 0) m.setAttribute('style', 'font-weight: bold;');
    			mPopup.appendChild(m);
    		}
    	}
    	// create extra entries
    	for(var j = 0; j < items.length; j++){
    		if(items[j] == "separator") {
    	 		// kein GoUp mgl. und 2. Separator oder GoUp mgl.
    	 		if((i == 0 && j > 0) || (i != 0)) mPopup.appendChild(document.createElement('menuseparator'));
    	 	}
    	 	else {
    	 		var cmd = items[j] [2];
    	 		if(items[j] [2].indexOf('http://') >= 0 || items[j] [2].indexOf('https://') >= 0) {
    	 		  var theUrl = items[j] [2] + content.location.href;
    	 		  cmd = "if(event.button == 0 && !event.ctrlKey) getBrowser().contentWindow.location.assign('" + theUrl + "'); if(event.button == 1 || (event.button == 0 && event.ctrlKey)) gBrowser.selectedTab = gBrowser.addTab('" + theUrl + "');";
    	 		}
    			//mPopup.appendChild(this.genMenuitem(items[j] [0], items[j] [1], cmd + " event.stopPropagation();"));
    	 		mPopup.appendChild(this.genMenuitem(items[j] [0], items[j] [1], cmd, "event.stopPropagation();"));
    	 	}
    	}
    }
    this.genMenuitem = function(label, img, mouseup, cmd) {
    	var m = document.createElement('menuitem');
    	m.setAttribute('label', label);
    	m.setAttribute('class', 'menuitem-iconic');
    	if(img != null) m.setAttribute('image', img);
    	if(mouseup != null) m.setAttribute('onmouseup', mouseup);
    	if(cmd != null) m.setAttribute('oncommand', cmd);
    	m.tooltipText = label;
    	return m;
    }
    this.getURLs = function() {
    	var URLs=[], loc = getBrowser().contentWindow.location;
    	try {
    		if(loc.protocol == 'about:') return URLs;
    		var path = loc.href;
    		path = path.replace(/^.*:\/\/[^\/]*\//, '');                // strip scheme and host
    		path = path.replace(/\/$/, '');                             // strip trailing slash
    		var host = loc.host;
    		var scheme = loc.protocol+'//';
    		var emptyPath = ('' == path);
    		if(path.indexOf('#') > 0) {                                 // strip hash
    			path = path.replace(/#.*/, '');
    			URLs[URLs.length] = scheme + host + '/' + path;
    		}
    		if(path.indexOf('?') > 0) {                                 // strip querystring
    			path = path.replace(/\?.*/, '');
    			URLs[URLs.length] = scheme + host + '/' + path;
    		}
    		while(path.indexOf('/') > 0) {                              // strip files/directories
    			path = path.replace(/\/[^\/]*$/, '');
    			URLs[URLs.length] = scheme + host + '/' + path + '/';
    		}
    		// host only
    		if(!emptyPath) URLs[URLs.length] = scheme + host + '/';     
    		if(!host.match(/([0-9]+\.)+/) && loc.protocol != "ftp:") {  // strip subdomains (not IP and not ftp)
    			var hostSuff = host.substr(host.length - 6);
    			host = host.substr(0, host.length - 6);
    			while(-1 != host.indexOf('.')) {
    				host = host.replace(/[^.]*\./, '');
    				URLs[URLs.length] = scheme + host + hostSuff + '/';
    			}
    		}
    		// http: => https:
    		if(loc.protocol == "http:") {
    			if(URLs.length > 0) URLs[URLs.length] = "separator";
    			var path = loc.href.substring(7, loc.href.length);
    			URLs[URLs.length] = "https://" + path;
    		}
    		// https: => http:
    		if(loc.protocol == "https:") {
    			if(URLs.length > 0) URLs[URLs.length] = "separator";
    			var path = loc.href.substring(8, loc.href.length);
    			URLs[URLs.length] = "http://" + path;
    		}
    		// http: u. https: => ftp:
    		if(!host.match(/([0-9]+\.)+/) && (loc.protocol == "http:" || loc.protocol == "https:")) {
    			host = loc.host;
    			var tld = host.substring(host.lastIndexOf('.'), host.length);
    			var domain = host.substring(0, host.lastIndexOf('.'));
    			if(domain.indexOf('.') != -1) domain = domain.substring(domain.lastIndexOf('.') + 1, domain.length);
    			URLs[URLs.length] = "ftp://ftp." + domain + tld;
    		}
    		// ftp: => http: u. https:
    		if(loc.protocol == "ftp:") {
    			if(URLs.length > 0) URLs[URLs.length] = "separator";
    			host = loc.host;
    			var tld = host.substring(host.lastIndexOf('.'), host.length);
    			var domain = host.substring(0, host.lastIndexOf('.'));
    			if(domain.indexOf('.') != -1) domain = domain.substring(domain.lastIndexOf('.') + 1, domain.length);
    			URLs[URLs.length] = "http://" + domain + tld;
    			URLs[URLs.length] = "http://www." + domain + tld;
    		}
    	} catch(e) { }
    	return URLs;
    }
    this.urltools_getDocuments = function(frame, documentList) {
    	const framesList = frame.frames;
    	documentList.push(frame.document);
    	for(var i = 0; i < framesList.length; i++) {
    		this.urltools_getDocuments(framesList[i], documentList);
    	}
    	return documentList;
    }
    this.urltools_dwnlEmbed = function() {
    	var docs = this.urltools_getDocuments(content, new Array());
    	var count = 0;
    	for(var j = 0; j < docs.length; j++) {
    		var embeds = docs[j].getElementsByTagName("embed");
    		for(var k = 0; k < embeds.length; k++) {
    			count++;
    			var url = makeURLAbsolute(docs[j].baseURI, embeds[k].src);
    			saveURL(url, "");
    		}
    	}
    	if (count == 0) {
    		alert(dwnembedMessage);
    	}
    }
    this.setAttribute("author",'eXXile');								// Stores Author.
    this.setAttribute("version",'0.5');                                                 		// Stores Version.
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/url-tools.html');		// Stores HomePage.
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.*');						// Stores Dependency.
    this.setAttribute("status",'Complete');								// Stores Devstatus.
    this.setAttribute("public",true);								// Stores Public.

    Help Tab

  566. URLBar Search

    Code Tab

    /*Code*/
    /* -------------------------------------------------------------
         URLBar Search
         by LouCypher (aka Zoolcar9)
         This button will search anything you type in location bar
         For Firefox 2.0 or above only
       ------------------------------------------------------------- */
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    if(!("@mozilla.org/browser/search-service;1" in Components.classes)) {
      this.tooltipText = "This button requires Firefox 2.0 search API";
      this.style.opacity = ".25";
      this.disabled = true;
      return;
    }
    function searchService() {
      return Components.classes["@mozilla.org/browser/search-service;1"]
              .getService(Components.interfaces.nsIBrowserSearchService);
    }
    this.search = function(aNode, aEvent) {
      var openInTab, loadInBackground;
      try {
        openInTab = gPrefService.getBoolPref("browser.search.openintab");
        loadInBackground = gPrefService.getBoolPref("browser.search.openintab.loadInBackground")
      } catch(ex) {
      }
      var query = gURLBar.value;
      var url = aNode.engine.getSubmission(query, null).uri.spec;
      handleURLBarRevert(); //reset the URL bar
      if(openInTab) {
        var newTab = gBrowser.addTab(url);
        if(!loadInBackground) gBrowser.selectedTab = newTab;
      } else
        openUILink(url, aEvent, false, true);
    }
    this.checkForMiddleClick = function(aNode, aEvent) {
      if(aEvent.button == 1) {
        var fn = new Function("event", "this.search(this, event)");
        fn.call(aNode, aEvent);
      }
    }
      this.leftclick = function(evt) {
        switch(evt.eventPhase) {
          case 0:
          break;
          case 2:
            if (evt.originalTarget.id == "") this.search(this, evt); // fires in FF3
          break;
          case 3:                                            // Won't fire in FF3 see case 2:
            this.search(this, evt);
          break;
          default:
        }
      };
      this.cleftclick = function(evt) {
        this.checkForMiddleClick(this, evt);
      };
      this.midclick = function(evt) {
        this.checkForMiddleClick(this, evt);
      };
    this.selectEngine = function(aNode, aEvent) {
      var engine = aEvent.target.engine;
      var ss = searchService();
      ss.currentEngine = ss.getEngineByName(engine.name);
      aNode.engine = engine;
      aNode.image = aEvent.target.getAttribute("src");
    }
    this.populateMenu = function(aNode) {
      var ss = searchService();
      var engines = ss.getVisibleEngines({ });
      const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
      while(aNode.firstChild && aNode.firstChild.localName != "menuseparator") {
        aNode.removeChild(aNode.firstChild);
      }
      for(var i = engines.length - 1; i >= 0; i--) {
        var mi = document.createElementNS(kXULNS, "menuitem");
        mi.id = "cb-search-" + engines[i].name;
        mi.className = "menuitem-iconic searchbar-engine-menuitem";
        mi.setAttribute("label", engines[i].name);
        if(engines[i].iconURI)
          mi.setAttribute("src", engines[i].iconURI.spec);
        mi.engine = engines[i];
        if(mi.engine == ss.currentEngine)
          mi.style.fontWeight = "bold";
        mi.setAttribute("onclick",
          "parentNode.parentNode.selectEngine(parentNode.parentNode, event)");
        aNode.insertBefore(mi, aNode.firstChild);
      }
    }
    this.currentEngine = searchService().currentEngine;
    var ss = searchService();
    this.engine = ss.currentEngine;
    this.image = this.engine.iconURI.spec;
    var mp = this.appendChild(document.createElement("menupopup"));
    mp.setAttribute("onpopupshowing", "parentNode.populateMenu(this)");
    mp.setAttribute("oncommand", "event.stopPropagation()");
    var managerSeparator = mp.appendChild(document.createElement("menuseparator"));
    managerSeparator.id = "cb-searchbutton-separator"
    var managerItem = mp.appendChild(document.createElement("menuitem"));
    managerItem.setAttribute("label", "Manage Search Engines...");
    managerItem.setAttribute("oncommand",
      "openDialog('chrome://browser/content/search/engineManager.xul', " +
      "'engineManager', 'chrome, dialog=no')");
    this.type = "menu-button";
    this.setAttribute("onclick", "custombuttons.gQuot.mHandler( event, this )");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','LouCypher');
    this.setAttribute('version','20080618.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/search-location-bar.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  567. User Agent to Clipboard

    Code Tab

    /*Code*/
    gClipboard.write(window.navigator.userAgent);
    alert(gClipboard.read());

    Initialization Tab

    /*Initialization code*/
    /*------------------------- Button Code Block Start --------------------------*/
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20090213.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/user-agent-clipboard.html');
    this.setAttribute('dependency','Fx 2.0.0.4 - 3.2a1pre, Tb 2.0.0.19 - Tb 3.0b2pre, Calendar 1.0pre , CB2 2.0.0*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    /*------------------- Custom Buttons² Attributes Block End -------------------*/

    Help Tab

    ******************************************
       Places the application User Agent Info
     into the System Clipboard for pasting.
     Credits:
       Author:  SCClockDr
       Image:   Mr Tech Toolkit Extension
  568. userChrome button

    Code Tab

    /*Code*/

    Initialization Tab

    // Add all userChrome.js additions here
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/userchromejs-wo-userchromejs-extension-deepakjoshi04.html');

    Help Tab

  569. View ClipBoard

    Code Tab

    /*Code*/
    try {
    var path = 'C:/WINDOWS/system32/clipbrd.exe';
    var file = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1'].getService(Components.interfaces.nsIProcess);
    file.initWithPath(path.replace(/\//g,'\\\\'));
    file.launch();
    }
    catch (e) {
    alert(e);
    }

    Initialization Tab

    /*Initialization Code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','SCClockDr');
    this.setAttribute('version','20080124.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/view-clipboard.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/

    Help Tab

    Help%20not%20developed%20for%0A%3Clabel%3E%20button%20%0ACbuttons2-button%3Cid%3E%0A
  570. View Menu

    Code Tab

    /*Code*/

    Initialization Tab

    var that=this,Cb=custombuttons,num=Cb.getNumber(this.id),menuName='view-menu',popupID="cb2mBar-"+menuName+num;
    document.getElementById(menuName).setAttribute('collapsed','true');
    this.initBtn = function() {
      var menuNode = document.getElementById(menuName).firstChild;
      mPop=menuNode.cloneNode(true);
      mPop.setAttribute("id", popupID);
      that.appendChild(mPop);
    }
    setTimeout(this.initBtn, 5000);
    this.hideDropMarker = function() {
      var dropMarker = document.getAnonymousElementByAttribute(that, "class", "toolbarbutton-menu-dropmarker");
      if (dropMarker) {
        dropMarker.setAttribute("hidden", "true");
      } else {
        setTimeout(that.hideDropMarker, 1);
      }
    }
    that.hideDropMarker();
    this.type="menu";
    this.setAttribute("class", "menu-iconic");
    // mouseovers
    this.setAttribute("onmouseover", "this.hideDropMarker();" );
    // button attributes
    this.setAttribute("author",'nicholas');
    this.setAttribute("version",'20081211.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/menubar-buttons-group-x.html');
    this.setAttribute("dependency",'FF 3.0.*,CB 2.0.7.9*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    // make it part of the button group for menubar-menus
    custombuttons.setToolbarGroup(this, "menubar-menus");

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  571. View Selection Source in Tab

    Code Tab

    function getSelectedSource() {
      if(!content.getSelection()) return;
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var x = content.document.createElement("div");
      x.appendChild(winWrapper.getSelection().getRangeAt(0).cloneContents());
      return x.innerHTML;
    }
    var sel = getSelectedSource();
    if(!sel) {
     alert("You didn't select any text.");
     return;
    }
    var doctype = content.document.contentType;
    var charset = content.document.characterSet;
    var url = "view-source:data:" + doctype + ";charset=" + charset +  "," + encodeURIComponent(sel);
    gBrowser.loadOneTab(url, null, null, null, false);
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/view-selection-source-tab.html');

    Help Tab

  572. View Selection Source in Tab

    Code Tab

    function getSelectedSource() {
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var x = content.document.createElement("div");
      x.appendChild(winWrapper.getSelection().getRangeAt(0).cloneContents());
      return x;
    }
    var sel = getSelectedSource();
    if(!sel.innerHTML)
    {
    	var sourceURL = 'view-source:' + content.document.location.href;
    	gBrowser.selectedTab = gBrowser.addTab(sourceURL);
    }
    else
    {
    	var doctype = content.document.contentType;
    	var charset = content.document.characterSet;
    	var url = "view-source:data:" + doctype + ";charset=" + charset + "," + encodeURIComponent(sel.innerHTML);
    	gBrowser.loadOneTab(url, null, null, null, false);
    }
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/view-source-selection-source.html');

    Help Tab

  573. View Source

    Code Tab

    Initialization Tab

    this.thing = function(evt) { // "thing" is the name of the function
    // this makes sure you can get to the CB context menu via shift click
    if(evt.shiftKey) {
       this.showPopup(this);
       return;
    }
      switch(evt.button) {
        case 0: // Anything in this section up till the spot that says, "break;" will be your left-click
    var sourceURL = 'view-source:' + content.document.location.href;
    gBrowser.selectedTab = gBrowser.addTab(sourceURL);
       break;
       case 1: // Anything in this section up till the spot that says, "break;" will be your middle-click
    var sourceURL = 'view-source:' + content.document.location.href;
    window.open(sourceURL);
       break;
       case 2: // Anything in this section up till the spot that says, "break;" will be your right-click
    var url =content.document.location.href;
    openWebPanel(url, 'view-source:' + url);
       break;
      }
    }
    // This is the CB context menu
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.thing(event);');
    this.setAttribute('context', '');
    this.tooltipText = "View Source";
    } 
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/view-source-aranittara.html');

    Help Tab

  574. View Source

    Code Tab

    BrowserViewSourceOfDocument(content.document);

    Initialization Tab

    this.bottomPanel = function(url, contextmenu) {
      var prefString = "custombuttons.bottomPanel.url"
      if(!url) {
        try {
          url = gPrefService.getCharPref(prefString);
        } catch(ex) {
          url = "";
        }
      }
      if(url == gURLBar.value && !url.match(/^\w+?\:/)) url = "http://" + url;
      var panelID = "bottom-panel";
      var gPanel = document.getElementById(panelID);
      if(gPanel) {
        if(gPanel.firstChild.getAttribute("src").indexOf(url) != 0) {
          gPanel.firstChild.setAttribute("src", url);
          if(contextmenu)
            gPanel.setAttribute("contextmenu", contextmenu);
          else
            gPanel.removeAttribute("contextmenu");
        } else {
          gPanel.parentNode.removeChild(gPanel.previousSibling);
          gPanel.parentNode.removeChild(gPanel);
        }
      } else {
        var tbb = document.createElement("toolbarbutton");
            tbb.className = "tabs-closebutton";
            tbb.style.cursor = "pointer";
            tbb.setAttribute("oncommand",
                "this.parentNode.parentNode.removeChild(this.parentNode.nextSibling); " +
                "this.parentNode.parentNode.removeChild(this.parentNode)");
        var spr = document.createElement("spacer");
            spr.setAttribute("flex", 1);
        var spl = document.createElement("splitter");
            spl.height = "28px";
            spl.appendChild(spr);
            spl.appendChild(tbb);
        var ifr = document.createElement("iframe");
            ifr.setAttribute("flex", 1);
            ifr.setAttribute("src", url);
            ifr.setAttribute("tooltip", "aHTMLTooltip");
        var box = document.createElement("box");
            box.id = panelID;
            box.height = "300px";
            box.appendChild(ifr);
        if(contextmenu) box.setAttribute("contextmenu", contextmenu);
        gBrowser.parentNode.appendChild(spl);
        gBrowser.parentNode.appendChild(box);
      }
      gPrefService.setCharPref(prefString, url);
    }  
    this.getFile = function() {
      try {
        const nsIFilePicker = Components.interfaces.nsIFilePicker;
        var fp = Components.classes['@mozilla.org/filepicker;1']
                    .createInstance(nsIFilePicker);
        fp.init(window, gNavigatorBundle.getString("openFile"),
                         nsIFilePicker.modeOpen);
        fp.appendFilters(nsIFilePicker.filterAll |
                         nsIFilePicker.filterText |
                         nsIFilePicker.filterImages |
                         nsIFilePicker.filterXML |
                         nsIFilePicker.filterHTML);
        if(fp.show() == nsIFilePicker.returnOK)
        return fp.fileURL.spec;
      } catch (ex) {
      }
    }
    this.popupShowing = function(node) {
      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                        .getService(Components.interfaces.nsIIOService);
      try {
        var pasteURL = ioService.newURI(readFromClipboard(), null, null);
      } catch(ex) {
      }
      node.lastChild.setAttribute("disabled", !pasteURL ? true : false);
    }
    var mPopup = document.createElement("menupopup");
    mPopup.popupShowing = this.popupShowing.bind(this);
    mPopup.setAttribute("onpopupshowing", "this.popupShowing(this);");
    function addMenuitem(label, url, context, obj) {
      var mItem = document.createElement("menuitem");
      mItem.func = obj.bottomPanel.bind(obj);
      mItem.file = obj.getFile.bind(obj);
      mItem.setAttribute("label", label);
      mItem.setAttribute("oncommand",
        "event.stopPropagation(); " +
        (context ? "this.func('" + url + "', '" + context + "')" : "this.func('" + url + "')"));
      mPopup.appendChild(mItem);
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/view-source-xpi.html');

    Help Tab

  575. View Source & View Selection Source All in One

    Code Tab

    /*代码*/

    Initialization Tab

    /*Initialization code*/
    function getSelectedSource() {
      var focusedWindow = document.commandDispatcher.focusedWindow;
      var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
      var x = content.document.createElement("div");
      x.appendChild(winWrapper.getSelection().getRangeAt(0).cloneContents());
      return x;
    }
    this.leftclick = function(e) {
    document.getElementById('menu_pageSource').click();
    }
    this.rightclick = function(e) {
    var sel = getSelectedSource();
    if(!sel.innerHTML)
    {
    	var sourceURL = 'view-source:' + content.document.location.href;
    	gBrowser.selectedTab = gBrowser.addTab(sourceURL);
    }
    else
    {
    	var doctype = content.document.contentType;
    	var charset = content.document.characterSet;
    	var url = "view-source:data:" + doctype + ";charset=" + charset + "," + encodeURIComponent(sel.innerHTML);
    	gBrowser.loadOneTab(url, null, null, null, false);
    }
    }
    this.setAttribute('onclick', 'gQuot(event, this)');
    this.tooltipText = "L: View Source|R: View Selection Source|M: Menu";
    this.setAttribute('author','bimzcy');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/view-source-view-selection-source-all-one.html');

    Help Tab

  576. View Source Panel

    Code Tab

    var perfEditor = "chrome://performancing/content/editor.xul";
    var perfBoxIFrame = document.getElementById("perFormancingMidasFrame");
    if(perfBoxIFrame.parentNode.collapsed) gperformancing.openBottomBar();
    if(perfBoxIFrame.getAttribute("src").indexOf(content.location.href) == -1)
      perfBoxIFrame.setAttribute("src", "view-source:" + content.location.href);
    else gperformancing.openBottomBar();
    

    Initialization Tab

    if(typeof gperformancing != "object") {
      var ext = "Performancing";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/view-source-panel-button.html');

    Help Tab

  577. Visible Links

    Code Tab

    /*Code*/

    Initialization Tab

    this.quot = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
    switch(evt.button) {
    case 0:
    var newSS, styles=':link, :link * { color: red ! important; background: yellow ! important; text-decoration: none ! important; font-weight: bold ! important; } :visited, :visited * { color:  red ! important; background: yellow ! important; text-decoration: none ! important; font-weight: bold ! important; }';
    break;
    case 1:
    loadURI("javascript:history.go(0)");
    break;
    case 2:
    var newSS, styles=':link, :link * { color: red ! important; background: yellow ! important; text-decoration: blink ! important; font-weight: bold ! important; } :visited, :visited * { color:  red ! important; background: yellow ! important; text-decoration: blink ! important; font-weight: bold ! important; }';
    break;
      }
    if(content.document.createStyleSheet)
    {
    content.document.createStyleSheet("javascript:'"+styles+"'");
    }
    else
    {
    newSS=content.document.createElement('link');
    newSS.rel='stylesheet';
    newSS.href='data:text/css,'+escape(styles);
    content.document.getElementsByTagName("head")[0].appendChild(newSS);
    }
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
     document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    this.tooltipText = 'L = Visible | M = Original | R = Very Visible';
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/visible-links-newf.html');

    Help Tab

  578. Visible Links

    Code Tab

    /*Code*/

    Initialization Tab

    this.removeCSS = function() {
      var css=content.document.getElementById("visible-links-css");
      if (css) css.parentNode.removeChild(css);
    }
    this.quot = function(evt) {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
    switch(evt.button) {
    case 0:
    var newSS, styles=':link, :link * { color: red ! important; background: yellow ! important; text-decoration: none ! important; font-weight: bold ! important; } :visited, :visited * { color:  red ! important; background: yellow ! important; text-decoration: none ! important; font-weight: bold ! important; }';
    break;
    case 1:
    //loadURI("javascript:history.go(0)");
    //break;
    this.removeCSS();
    return; // return instead of break to exit
    case 2:
    var newSS, styles=':link, :link * { color: red ! important; background: yellow ! important; text-decoration: blink ! important; font-weight: bold ! important; } :visited, :visited * { color:  red ! important; background: yellow ! important; text-decoration: blink ! important; font-weight: bold ! important; }';
    break;
      }
    //if(content.document.createStyleSheet)
    //{
    //content.document.createStyleSheet("javascript:'"+styles+"'");
    //}
    //else
    //{
    // remove styles if already appended in HEAD or you'll get double styles
    this.removeCSS();
    newSS=content.document.createElement('link');
    // add an id to the style
    newSS.id="visible-links-css";
    newSS.rel='stylesheet';
    newSS.href='data:text/css,'+escape(styles);
    content.document.getElementsByTagName("head")[0].appendChild(newSS);
    //}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById('custombuttons-contextpopup');
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
     document.popupNode = node;
      popup.showPopup(node, x, y, 'popup', null, null);
    }
    this.setAttribute('onclick', 'this.quot(event);');
    this.setAttribute('context', '');
    this.tooltipText = 'L = Visible | M = Original | R = Very Visible';
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/visible-links.html');

    Help Tab

  579. Web Developer Menu Button

    Code Tab

    webdeveloper_toggleToolbar();

    Initialization Tab

    if ( typeof webdeveloper_about == "function" ) {
      var test = this.getElementsByTagName('menupopup');
      if(test.length) return;
      var webdev = document.getElementById('webdeveloper-menu')
                   .getElementsByTagName('menupopup')[0];
      var popup = webdev.cloneNode(true);
      popup.setAttribute("oncommand", "event.stopPropagation()");
      this.appendChild(popup);
      this.type = 'menu-button';
    } // End if ( typeof webdeveloper_about == "function" )
    else {
      var ext = "Web Developer";
      var err = "[" + this.id + "] - " + ext + " extension is not installed or is disabled.";
      Components.utils.reportError(err);
      this.disabled = true;
    } // End else ( typeof webdeveloper_about == "function" )
    this.style;
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas,LouCypher');
    this.setAttribute("version",'20080306.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/web-developer-menu-button.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    if ( this.type != 'menu-button' ) {
      this.disabled = true;
      this.style.opacity = '.25'
    }
    

    Help Tab

    Click directly on button to open Web Developer toolbar
    Menu has all the options built in as well
  580. Web Developer Menu Button

    Code Tab

    webdeveloper_toggleToolbar();

    Initialization Tab

    if ( typeof webdeveloper_about == "function" ) {
      var test = this.getElementsByTagName('menupopup');
      if(test.length) return;
      var webdev = document.getElementById('webdeveloper-menu')
                   .getElementsByTagName('menupopup')[0];
      var popup = webdev.cloneNode(true);
      popup.setAttribute("oncommand", "event.stopPropagation()");
      this.appendChild(popup);
      this.type = 'menu-button';
    } // End if ( typeof webdeveloper_about == "function" )
    else {
      var ext = "Web Developer";
      var err = "[" + this.id + "] - " + ext + " extension is not installed or is disabled.";
      Components.utils.reportError(err);
      this.disabled = true;
    } // End else ( typeof webdeveloper_about == "function" )
    this.style;
    this.setAttribute("onmouseover", "custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "custombuttons.ButtonDim(event);" );
    this.setAttribute("author",'nicholas,LouCypher');
    this.setAttribute("version",'20080306.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/web-developer-menu-button.html');
    this.setAttribute("dependency",'FF 2.0.*,CB 2.0.*');
    this.setAttribute("status",'Complete');
    this.setAttribute("public",true);
    if ( this.type != 'menu-button' ) {
      this.disabled = true;
      this.style.opacity = '.25'
    }
    

    Help Tab

    Click directly on button to open Web Developer toolbar
    Menu has all the options built in as well
  581. Web-Clip to a bookmark folder

    Code Tab

    /*Code*/

    Initialization Tab

    // ***** USER PREFS ***** //
    /*
    	AlwaysSelectFolder controls when you will be asked to select the folder for bookmarks to be saved in
    		сtrue  = the button will ask you everytime you try to bookmark a tab
    		false = the button will only ask you the first time you bookmark a tab
    	ShowAlerts controls whether alerts are shown by the button
    		true  = show alerts
    		false = don't show alerts
    */
    var AlwaysSelectFolder = false;
    var ShowAlerts = true;
    // ***** VARS ***** //
    var install_time = 1260813910;
    var Cb = custombuttons;
    var num = Cb.getNumber(this.id);
    var prefstring = "custombuttons.bookmarktofolder-"+num;
    var button = this;
    var NameStr = "Comments inside bookmarks";
    var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsINavHistoryService);
    var options = historyService.getNewQueryOptions();
    var query = historyService.getNewQuery();
    var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
    var menuFolder = bmsvc.bookmarksMenuFolder; // Bookmarks menu folder
    var toolbarFolder = bmsvc.toolbarFolder; // Bookmarks/Personal toolbar folder
    var unsortedFolder = bmsvc.unfiledBookmarksFolder; // Unsorted bookmarks folder
    // ***** FUNCTIONS ***** //
    function GetPref(pref)
    {
    	if (Cb.getPrefs(prefstring+".install-time") == install_time) {
    		return [true, Cb.getPrefs(prefstring+pref)];
    	} else {
    		Cb.setPrefs(prefstring+pref, "");
    		return [false, ""];
    	}
    }
    function BkmrkFolderSelBox(CurrPath, FolderID)
    {
    	var SelBoxArr = new Array();
    	query.setFolders([FolderID], 1);
    	var result = historyService.executeQuery(query, options);
    	var rootNode = result.root;
    	rootNode.containerOpen = true;
    	SelBoxArr[0] = "Use this folder";
    	// iterate over the immediate children of this folder and add to array
    	for (var i = 0; i < rootNode.childCount; i ++) {
    		var node = rootNode.getChild(i);
    		if (node.type == 6) {
    			SelBoxArr[SelBoxArr.length] = node.title;
    		}
    	}
    	// close a container after using it!
    	rootNode.containerOpen = false;
    	if (SelBoxArr.length == 1)
    		return [false, "defaulted"];
    	var cbSelBox = Cb.selectBox(NameStr+":", "Please select the bookmarks folder where notes will be stored: (Currently: "+CurrPath+" )", SelBoxArr);
    	if (cbSelBox[0] == false) {
    		if (ShowAlerts)
    			Cb.alertSlide(NameStr+":", "Cancelled, no folder selected.");
    		return [false, "cancelled"];
    	} else {
    		var SelectedFolder = {id: bmsvc.getChildFolder(FolderID, SelBoxArr[cbSelBox[1].value]), title: SelBoxArr[cbSelBox[1].value]};
    		return [true, "selected", SelectedFolder];
    	}
    	return [false, cancelled];
    }
    function SelectFolder()
    {
    	Selecting = true;
    	Status = "";
    	SelPath = "";
    	var SelBoxArr = new Array();
    	SelBoxArr[0] = "Bookmarks Menu";
    	SelBoxArr[1] = "Bookmarks Toolbar";
    	SelBoxArr[2] = "Unsorted Bookmarks";
    	var FoldersArr = new Array();
    	FoldersArr[0] = {id: menuFolder, title: "Bookmarks Menu"};
    	FoldersArr[1] = {id: toolbarFolder, title: "Bookmarks Toolbar"};
    	FoldersArr[2] = {id: unsortedFolder, title: "Unsorted Bookmarks"};
    	var cbSelBox = Cb.selectBox(NameStr+":", "Please select the bookmarks folder where notes will be stored:", SelBoxArr);
    	if (cbSelBox[0] == false) {
    		if (ShowAlerts)
    			Cb.alertSlide(NameStr+":", "Cancelled, no folder selected.");
    		return;
    	} else {
    		Folder = FoldersArr[cbSelBox[1].value];
    	}
    	while (Selecting == true) {
    		SelPath = SelPath+Folder.title+"/";
    		ChooseFolder = BkmrkFolderSelBox(SelPath, Folder.id);
    		Selecting = ChooseFolder[0];
    		Status = ChooseFolder[1];
    		if (Selecting && (ChooseFolder[2].id != 0))
    			Folder = ChooseFolder[2];
    		else
    			Selecting = false;
    	}
    	if (Status != "cancelled") {
    		Cb.setPrefs(prefstring+".folder", ""+Folder.id);
    		Cb.setPrefs(prefstring+".install-time", install_time);
    		button.tooltipText = 'L: Bookmark selected to '+bmsvc.getItemTitle(Folder.id)+"\n"+"M: Select the folder for storage";
    		return true;
    	} else {
    		return false;
    	}
    }
    function Bookmark()
    {
    	var pFolderID = Cb.getPrefs(prefstring+".folder");
    	try {
    		var test = bmsvc.getItemTitle(pFolderID)
    	} catch(error) {
    		if (Cb.confirmBox(NameStr, "There was a problem accessing the folder that you are trying to bookmark to, the most probable cause of this is the folder has been removed since you selected it."+"\n"+"\n"+"Would you like to select a different folder to bookmark to?", "Yes", "No")) {
    			if (SelectFolder())
    				pFolderID = Cb.getPrefs(prefstring+".folder");
    			else
    				return;
    		} else {
    			return;
    		}
    	}
    var selection = document.commandDispatcher.focusedWindow.getSelection().toString();
    //var selection = getBrowserSelection();//this doesn't copy all the selection, just ~150 first selected symbols
    if (selection ==""){
    selection = gBrowser.selectedBrowser.webNavigation.document.title || gBrowser.selectedBrowser.webNavigation.currentURI.spec;
    }
    	bmsvc.insertBookmark(pFolderID, gBrowser.selectedBrowser.webNavigation.currentURI, -1, selection);
            PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksMenuFolderId);
    }
    // ***** MOUSE HANDLING ***** //
    this.leftclick = function(evt)
    {
    	if ((!Cb.isPref(prefstring+".folder")) || (GetPref(".folder")[1] == "") || (AlwaysSelectFolder)) {
    		if (SelectFolder()) {
    			Bookmark();
    		}
    	} else {
    		Bookmark();
    	}
    }
    this.midclick = function(evt)
    {
    	SelectFolder();
    };
    this.rightclick = function(evt){
    	PlacesCommandHook.showPlacesOrganizer('AllBookmarks');
    //	toggleSidebar('viewBookmarksSidebar');
    }
    // ***** INITIALISATION ***** //
    if ((!Cb.isPref(prefstring+".install-time")) || (Cb.getPrefs(prefstring+".install-time") == ""))
    	Cb.setPrefs(prefstring+".install-time", install_time);
    if ((!Cb.isPref(prefstring+".folder")) || (GetPref(".folder")[1] == "")) {
    	Cb.setPrefs(prefstring+".folder", "");
    	this.tooltipText = "L: Select the folder for storage and copy selected text there"+"\n"+"M: Select the folder for storage";
    } else {
    	try {
    		this.tooltipText = 'L: Copy selected text to '+bmsvc.getItemTitle(Cb.getPrefs(prefstring+".folder"))+"\n"+'M: Change the folder for storage'+'\n'+"R: Bookmarks manager";
    	} catch(error) {
    		this.tooltipText = 'L: Select the folder for storage and copy selected text there'+"\n"+'M: Select the folder for storage';
    	}
    }
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    this.setAttribute( 'ondblclick', 'custombuttons.gQuot.mHandler( event, this )' );
    // ***** ATTRIBUTES ***** //
    this.setAttribute('author','Eleon_Kenson');
    this.setAttribute('version','2010-04-03');
    this.setAttribute('dependency','FF3.0*, CB2 2.0.9*');
    this.setAttribute('status','Public');
    this.setAttribute('public',true);
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/revolutionary-button-replaces-scrapbook.html');

    Help Tab

    ToDo:
    -on right click open selected folder in the sidebar (like in Flat Bookmarks extension, see http://www.xuldev.org/flatbm/)
    -Change tooltiptext acc. to whether the text is selected or not
    Description:
    Revolutionary button that replaces Scrapbook !
    Your web-clips & comments to webpages can now be stored & organised in one database along with bookmarks.
    Select some text and click on this button.
    The page will be bookmarked with the selected text instead of the title of that bookmark.
    Clipped text is placed into UNSORTED folder by default. To change the folder middle-click the button.
    Based on:
    * button http://custombuttons2.com/forum/buttons/buttons-database/bookmark-folder.html
    * information about how to pass selected text into a string variable: https://forums.addons.mozilla.org/viewtopic.php?f=7&t=384
    Help:
    If this is your first time using the button, middle click it to choose the folder for bookmarks to go into in the future.
    When you left click on the button after this, it will bookmark the current tab to the selected folder.
    If you did not choose a folder before you first left clicked on the button, you'll be prompted to do so before the current tab is bookmarked.
    You can middle click the button to re-select the folder for bookmarks to go into.
  582. Wikipedia

    Code Tab

    //Just highlight text and then click on this button for a google search.
    http://www.google.co.uk/search?hl=en&q=hello&btnG=Google+Search&meta=
    var addybit="http://en.wikipedia.org/wiki/";
    var querybit="Special:Search?search=";
    var lastbit="&go=Go";
    //MANY thanks to Zoolcar9 for this bit ;-)
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
    var str = winWrapper.getSelection().toString();
    str = escape(str);
    var build=addybit+ querybit + str + lastbit;
    const url = build;
    window.open(url); 
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/wikipedia-highlighted-text-button.html');

    Help Tab

  583. Wikipedia

    Code Tab

    //Just highlight text and then click on this button for a google search.
    http://www.google.co.uk/search?hl=en&q=hello&btnG=Google+Search&meta=
    var addybit="http://en.wikipedia.org/wiki/";
    var querybit="Special:Search?search=";
    var lastbit="&go=Go";
    //MANY thanks to Zoolcar9 for this bit ;-)
    var focusedWindow = document.commandDispatcher.focusedWindow;
    var winWrapper = new XPCNativeWrapper(focusedWindow, "document", "getSelection()");
    var str = winWrapper.getSelection().toString();
    str = escape(str);
    var build=addybit+ querybit + str + lastbit;
    const url = build;
    window.open(url); 
    

    Initialization Tab

    /*Initialization code*/
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/wikipedia-highlighted-text-button.html');

    Help Tab

  584. Wikipedia Toolbar

    Code Tab

    var id = "wikipedia-toolbar";
    var toolbar = document.getElementById(id);
    toolbar.collapsed = !toolbar.collapsed;
    document.persist(id, "collapsed");
    

    Initialization Tab

    if(typeof wikipedia != "object") {
      var ext = "Wikipedia";
      var err = ext + " extension is not installed or is disabled.";
      this.setAttribute("oncommand",
        "alert('" + err + "'); " +
        "this.disabled = true; " +
        "this.style.opacity = '.25';"
      );
      return;
    }
    this.type = "checkbox";
    var toolbar = document.getElementById("wikipedia-toolbar");
    if(toolbar.collapsed) {
      this.setAttribute("checkState", 0);
      this.removeAttribute("checked");
    } else {
      this.setAttribute("checkState", 1);
      this.setAttribute("checked", true);
    }
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/wikipedia-toolbar-button.html');

    Help Tab

  585. Windows Lock

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
    this.startProcess=function(path,args){
    var file = Components.classes['@mozilla.org/file/local;1']
        .createInstance(Components.interfaces.nsILocalFile);
    var process = Components.classes['@mozilla.org/process/util;1']
        .getService(Components.interfaces.nsIProcess);
     file.initWithPath(path.replace(/\//g,'\\\\'));
     args=args.replace(/\//g,'\\');
    // file.launch();
     process.init(file);
     var arg=args.split(' ');
     process.run(false,arg,arg.length); 
    }
    this.onLeftClick=function()
    {
    	this.startProcess('c:/windows/system32/RunDll32.exe','user32.dll,LockWorkStation');
    }
    this.onMiddleClick=function()
    {
    this.startProcess('C:/WINDOWS/system32/control.exe','');
    }
    this.onRightClick=function()
    {
    this.startProcess('C:/WINDOWS/system32/taskmgr.exe','');
    }
    //********** No need to make any changes to below code **************
    this.execute= function(evt)
    {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
    	switch(evt.button) 
    	{
    		case 0:
    			this.onLeftClick();
    			break;
    		case 1:
    			this.onMiddleClick();
    			break;
    		case 2:
    			this.onRightClick();
    			break;
    	}
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.execute(event);");
    this.setAttribute("context", "");
    this.tooltipText = "L-Windows lock | M-Control Panel | R- TaskManager";
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','deepakjoshi04, others');
    this.setAttribute('version','20061116.02');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/windows-lock-control-pane-task-manager.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  586. Windoze Update

    Code Tab

     

    Initialization Tab

    /*Initialization code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
      alert( "This Button requires the Custom Buttons%s Extension".replace( /%s/,String.fromCharCode( 178 ) ) );
      this.disabled(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------------- Custom Buttons² Mouse Handler ------------------------
      Remove the un-necessary Functions within this code block
      or the entire code block for very simple left click buttons.
        Replace the function call "Msg.aMsg('...')"
        within each needed Click Function with
        the function call of your choice.
        Your function call will then execute.
        Access to the click event Object (evt)
        provides you full control.
    ------------------------------------- -- -------------------------------------*/
    let Cb2s = cb2String;
    let Cb = custombuttons;
    this.sLink = "http://windowsupdate.62nds.com/";
    this.leftclick = function(evt)
    {
      if ( this.ckSb( this ) ) {
        toggleSidebar();
        this.checked = false;
      } // End if ( this.ckSb( evt ) )
      else {
        loadURI( this.sLink );
      } // End else ( this.ckSb( evt ) )
    };
    this.cleftclick = function(evt)
    {
      if ( this.ckSb( evt ) ) {
        toggleSidebar();
        this.checked = false;
      } // End if ( this.ckSb( evt ) )
      else {
        gBrowser.addTab( this.sLink ).focus();
      } // End else ( this.ckSb( evt ) )
    };
    this.midclick = function(evt)
    {
      this.cleftclick(evt)
    };
    this.rightclick = function(evt)
    {
      if ( this.ckSb( evt ) ) {
        toggleSidebar();
        this.checked = false;
      } // End if ( this.ckSb( evt ) )
      else {
        this.sideBar( evt ) //{{{
      } // End else ( this.ckSb( evt ) )
    };
    this.setAttribute( 'onclick', 'custombuttons.gQuot.mHandler( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*-------------------- Custom Buttons² Mouse Handler End ---------------------*/
    /*------------------------- Button Code Block Start --------------------------*/
    /**  sideBar( link )
       Author:    George Dunham aka: SCClockDr
       Scope:     private
       Args:      link -
       Returns:   Nothing
       Called by: 1.
       Purpose:   1.
       TODO:      1.
       */
    this.sideBar = function( evt ) //{{{
    {
      let oBtn = evt.target;
      let link = oBtn.sLink;
      let label = "Windoze Update";
      let head = oBtn.ckSb( evt );
      if ( !head ) {
        openWebPanel();
        var sbLoc = document.getElementById( 'sidebar' ).contentDocument.location;
        sbLoc.href = link;
        document.getElementById( 'sidebar-box' ).hidden = false;
        document.getElementById( 'sidebar-title' ).value = label;
        document.getElementById( 'sidebar-box' ).collapsed = false;
        document.getElementById( 'sidebar-splitter' ).hidden = false;
        oBtn.checked = true;
        return;
      }
      if ( head ) {
        toggleSidebar();
        this.checked = false;
      }
    }; //}}} End Method sideBar(  )
    /**  ckSb( oBtn )
     Author:    George Dunham aka: SCClockDr
     Scope:     private
     Args:      oBtn -
     Returns:   oBtn.checked
     Called by: 1.
     Purpose:   1.
     TODO:      1.
     */
    this.ckSb = function( evt ) //{{{
    {
      let oBtn = evt.target;
      let label = "Windoze Update";
      oBtn.checked = ( document.getElementById( 'sidebar-title' ).getAttribute( 'value' ) == label );
      return oBtn.checked;
    }; //}}} End Method ckSb( evt )
    /*-------------------------- Button Code Block End ---------------------------*/
    /*-------------------------- Show Focus Block Start --------------------------*/
    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "this.ckSb( event ); if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    /*--------------------------- Show Focus Block End ---------------------------*/
    /*------------------ Custom Buttons² Attributes Block Start ------------------*/
    this.setAttribute('author','newf, SCClockDr');
    this.setAttribute('version','20090225.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/windoze-update.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Development');
    this.setAttribute('public',true);
    this.tooltipText += '\n L\tCurrent Tab \n M\tNew Tab \n R\tToggles in Sidebar';
    this.checked = false;
    /*------------------- Custom Buttons² Attributes Block End -------------------*/
    

    Help Tab

    Left:
        * Load Windoz Update in the Current Tab
    Left (Checked state):
        * Close the Side Bar if Windoz Update loaded.
    Middle or Ctrl+Left:
        * Load Windoz Update in a New Tab
    Middle or Ctrl+Left (Checked state):
        * Close the Side Bar if Windoz Update loaded.
    Right:
        * Load Windoz Update in the Side Bar
        * Close the Side Bar if Windoz Update loaded.
    Right (Checked state):
        * Close the Side Bar if Windoz Update loaded.
    Mouse Over:
        * Set the Checked state to reflect if Windoz Update is loaded in the Side Bar.
    
  587. Wizz

    Code Tab

    /*CODE*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization code*/
        this.textResize = function(evt) {
    if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
     switch(evt.button) {
        case 0:
            toggleSidebar('WizzRSSSidebar');
          break;
        case 1:
    toggleWizzToolbar();
    break;
                   case 2:
             openDialogFrm('find.xul',6);
            }
      }
      this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.textResize(event);");
    this.setAttribute("context", "");
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','KuRmA');
    this.setAttribute('version','20060815.01');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/wizz-rss-feed-button-kurma.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  588. Write/Print/Address Book

    Code Tab

    /*Code*/
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    if (typeof custombuttons.uCbuttonButes != 'function') {
    	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
    	this.disable(true);
    }
    var Msg = createMsg(this.label);
    var de = createDebug(this);
    /*----------------- Custom Buttons2 Mouse Handler ------------------*/
    this.leftclick   = function(evt){
    	MsgNewMessage();
    }
    this.midclick    = function(evt){
    	goDoCommand('cmd_print');
    }
    this.rightclick  = function(evt){
    	toAddressBook();
    }
    this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Global MouseClick handler gQuot
    /*----------------- Custom Buttons2 Mouse Handler End -------------------*/
    /*---------------------- Button Code Block Start ------------------------*/
    /*----------------------- Button Code Block End -------------------------*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','jw25');
    this.setAttribute('version','20090101');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/writeprintaddress-book-thunderbird.html');
    this.setAttribute('dependency','TB3.0.*,  TB2.0*, CB2 2.0.9.51*');
    this.setAttribute('status','Dev');
    this.setAttribute('public',true);
    //this.tooltipText = ' L: Write   M: Print   R: Address Book ';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    /*------------------------- Tooltip Block Start ------------------------------*/
    // ver 20090101.0200
    var sp = " ";  // hard space
    let cr = " ";  // hard space
       cr = (custombuttons.compareVersion( custombuttons.gAppVersion(), "3*" ) >= 0)? "\n " : cr ;   
    // Delete any unused lines.
    var ttip = " L:    Compose  "
        +cr+sp+" M:    Print "
        +cr+sp+" R:    Address Book ";
    this.tooltipText += sp+cr+sp+ttip+sp+sp;
    /*--------------------------- Tooltip Block End ------------------------------*/
    

    Help Tab

    Help:
         L-click:  Compose new e-mail
         M-click:  Print
         R-click:  Open Address Book
         Shift-click:  CustomButtons context menu     
    
  589. X-Ray Button

    Code Tab

    document.getElementById('xray').click();

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','bimzcy');
    this.setAttribute('version','20080914.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/x-ray-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  590. Youtube Download Video

    Code Tab

    // Check to see we're on the right page
    if (document.getElementById('download-youtube-video')==null && (content.document.location.href.match("http://") && content.document.location.href.match("youtube.com/watch"))) {
      // Grab all script tags and throw them in an array
      var scripts=content.document.getElementsByTagName('script');
      for (var i=0; i<scripts.length; i++) {
        // Grab the second script from the page it contains the variables for video_id and t.
        var theScr=scripts[2].innerHTML;
        // Cut it up so we can use only the section of code we need, the variable swfArgs
        var loc=theScr.indexOf('var swfArgs = {');
        loc=loc+15;
        theScr=theScr.substr(loc);
        var end=theScr.indexOf('};');
        theScr=theScr.substr(0,end);
        // Grab the t variable and make it into the variable "t"
        var tLoc=theScr.indexOf("\"t\": \"");
        tLoc=tLoc+6;
        theScr=theScr.substr(tLoc);
        tEnd=theScr.indexOf("\"");
        t=theScr.substr(0,tEnd);
        // Grab the video_id variable and make it into the variable "id"
        var idLoc=theScr.indexOf("\"video_id\": \"");
        idLoc=idLoc+13;
        theScr=theScr.substr(idLoc);
        idEnd=theScr.indexOf("\"");
        id=theScr.substr(0,idEnd);
        // Start of original bookmarklet code, most code stayed the same aside from a few "document" changing to "content.document"   
        var yt_mp4_path="http://www.youtube.com/get_video?fmt=18&video_id="+id+"&t="+t;
        var div_embed=content.document.getElementById('watch-embed-div');
        if(div_embed){
          var div_download=content.document.createElement('div');
          div_download.innerHTML='<br /> <span id=\'download-youtube-video\'><a href=\''+yt_mp4_path+'\'>Download as MP4</a> '+ ((navigator.userAgent.indexOf('Safari')!=-1)?'(control-click and select <i>Download linked file as</i>)':('(right-click and select <i>Save '+ (navigator.appName=='Microsoft Internet Explorer'?'target':'link') +' as)</i>'))+'</span>';
          div_embed.appendChild(div_download);
          return; // return here so we don't get as many links as we have script tags in our array from earlier
        } // END if(div_embed)
      } // END for
    } // END if (document.getElementById('download-youtube-video')...

    Initialization Tab

    this.style.opacity = '.65';
    this.setAttribute("onmouseover", "if (custombuttons) custombuttons.ButtonBrt(event);" );
    this.setAttribute("onmouseout", "if (custombuttons) custombuttons.ButtonDim(event);" );
    this.setAttribute('author','nicholas');
    this.setAttribute('version','20080622.00');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/youtube-download-video-button.html');
    this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*');
    this.setAttribute('status','Complete');
    this.setAttribute('public',true);

    Help Tab

    No help developed for 
    <label> button
    custombuttons-button<id>.
  591. Zap Style 1

    Code Tab

    /*Code*/
    (function()
       {
       var newSS, styles='* { background: white ! important; color: black !important; font-size: 14px !important; font-family: Verdana } :link, :link * { color: #0000EE !important } :visited, :visited * { color: #551A8B !important }';
       if (content.document.createStyleSheet)
          {
          content.document.createStyleSheet("javascript:'"+styles+"'");
          }
       else
          {
          newSS=content.document.createElement('link'); newSS.rel='stylesheet';
          newSS.href='data:text/css,'+escape(styles);
          content.document.getElementsByTagName("head")[0].appendChild(newSS);
          }
       }
    )();
    // =============================================================================
    

    Initialization Tab

    /*Initialization Code*/
    /*---------------------- Show Focus Block Start ------------------------*/
    this.style.opacity = '.65';
    this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
    this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
    /*----------------------- Show Focus Block End -------------------------*/
    /*--------------- Custom Buttons2 Attributes Block Start ----------------*/
    this.setAttribute('author','222fbj, cblover');
    this.setAttribute('version','null');
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/zap-style-1-set-background-and-font.html');
    this.setAttribute('dependency','null');
    this.setAttribute('status','null');
    this.setAttribute('public',true);
    this.setAttribute('help','0,null');
    // this.tooltipText += '';
    /*---------------- Custom Buttons2 Attributes Block End -----------------*/
    

    Help Tab

    null
  592. Zoom Page

    Code Tab

    /*Code*/

    Initialization Tab

    /*初期設定コード(スタートアップで実行)*/
    // ---------------   Event Detect   ------------------
    this.handle = function(evt) {
    	try {
    	if(evt.shiftKey) {
    		this.showPopup(this);
    		return;
    	}
      	switch(evt.button) {
      	case 0:
      		// ページ拡大
     		this.toggleZoom(true);
     		document.getElementById("cmd_fullZoomEnlarge").doCommand();
        		break;
      	case 1:	// Middle Click
      		// 標準サイズ
      		this.toggleZoom(true);
      		document.getElementById("cmd_fullZoomReset").doCommand();
      		break;
      	case 2:	// Right Click
      		// ページ縮小
      		this.toggleZoom(true);
      		document.getElementById("cmd_fullZoomReduce").doCommand();
      		break;
      	}
    	}catch(e) {alert(e);}
    	evt.preventDefault();
        	evt.stopPropagation();
        	return false;
    }
    this.toggleZoom = function ZoomManager_toggleZoom(useFullZoom) {
        var zoomLevel = ZoomManager.zoom;
        ZoomManager.useFullZoom = useFullZoom;
        ZoomManager.zoom = zoomLevel;
    }
    this.showPopup = function(node) {
    	var popup = document.getElementById("custombuttons-contextpopup");
    	var x = node.boxObject.x;
    	var y = node.boxObject.y + node.boxObject.height;
    	document.popupNode = node;
    	popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.handle(event);");
    this.tooltipText = "[L=Enlarge | M=Reset | R=Reduce]";
    this.style.opacity = '.65';
    this.setAttribute('style','border-color: transparent;');
    this.setAttribute("onmouseover", "this.style.opacity = '1'; this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';this.setAttribute('style','border-color: transparent;');" );
    this.setAttribute("onmousedown", "this.setAttribute('style','border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;');");
    this.setAttribute("onmouseup", "this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/zoom-text-and-zoom-page-buttons-fx3.html');

    Help Tab

  593. Zoom Text

    Code Tab

    /*Code*/

    Initialization Tab

    /*初期設定コード(スタートアップで実行)*/
    // ---------------   Event Detect   ------------------
    this.handle = function(evt) {
      try {
      if(evt.shiftKey) {
        this.showPopup(this);
        return;
      }
        switch(evt.button) {
        case 0:
          // ページ拡大
          this.toggleZoom(false);
          document.getElementById("cmd_fullZoomEnlarge").doCommand();
            break;
        case 1: // Middle Click
          // 標準サイズ
          this.toggleZoom(false);
          document.getElementById("cmd_fullZoomReset").doCommand();
        break;
        case 2: // Right Click
          // ページ縮小
          this.toggleZoom(false);
          document.getElementById("cmd_fullZoomReduce").doCommand();
          break;
        }
      }catch(e) {alert(e);}
      evt.preventDefault();
          evt.stopPropagation();
          return false;
    }
    this.toggleZoom = function ZoomManager_toggleZoom(useFullZoom) {
        var zoomLevel = ZoomManager.zoom;
        ZoomManager.useFullZoom = useFullZoom;
        ZoomManager.zoom = zoomLevel;
    }
    this.showPopup = function(node) {
      var popup = document.getElementById("custombuttons-contextpopup");
      var x = node.boxObject.x;
      var y = node.boxObject.y + node.boxObject.height;
      document.popupNode = node;
      popup.showPopup(node, x, y, "popup", null, null);
    }
    this.setAttribute("onclick", "this.handle(event);");
    this.tooltipText = "[L=Enlarge | M=Reset | R=Reduce]";
    this.style.opacity = '.65';
    this.setAttribute('style','border-color: transparent;');
    this.setAttribute("onmouseover", "this.style.opacity = '1'; this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');" );
    this.setAttribute("onmouseout", "this.style.opacity = '.65';this.setAttribute('style','border-color: transparent;');" );
    this.setAttribute("onmousedown", "this.setAttribute('style','border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;');");
    this.setAttribute("onmouseup", "this.setAttribute('style','border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;');");
    this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/zoom-text-and-zoom-page-buttons-fx3.html');

    Help Tab